3 ms·
>I don't get my language's build cache unless I jump through extra hoops to mount it into the build image This is what you should be doing, and you should not
by dingnuts 3y ago
>I don't get my language's build cache unless I jump through extra hoops to mount it into the build image
This is what you should be doing, and you should not be building your artifact with docker build during development. If you can help it, you don't want to compile your application inside of a container at all. Build it outside and COPY it when you're ready to ship, or use a volume during development (docker run -v)
If you cannot rebuild outside of the container, you should be able to build your build environment as an image once, then exec into the running container to rebuild there, but you should NOT be rebuilding your docker images for each compile loop. It sounds like that's where you're encountering the pain.
If you are rebuilding your docker image every time you recompile your application, you're doing it wrong.
- IanCal 3y agoWhy not just use FROM and multistage builds in your dockerfile?