4 ms·
This even works when one uses docker build to compile things. Just have a shell script that after the build copies the compilation result to a local directory m
by fpoling 9y ago
This even works when one uses docker build to compile things. Just have a shell script that after the build copies the compilation result to a local directory mounted as a volume in the docker container.
- cdancette 9y agoWhy not compile inside the volume already?
- fpoling 9y agoThis is what I have used before docker build started to support multiple images. That is, I had a shell script that run an image with a compiler that put the executable to a local directory. Then normal docker build would pickup the executable into the final image. But this does not take advantage of caching with docker build and made the infrastructure more complex. Dockerfile with multiple images addressed that nicely. Now single docker build command takes care about everything and generates production ready images. A shell script is only necessary during development to extract some files from the image to avoid restarting already running container.