3 ms·
Yeah, I suspect that while the author could use a development image to do all of the compiling, given that all of the nginx files are not in a single directory
by mnutt 7y ago
Yeah, I suspect that while the author could use a development image to do all of the compiling, given that all of the nginx files are not in a single directory it's my understanding that you'd need multiple COPY commands, and you'd still want to do all of the package manager operations in the prod build. It's really a tradeoff of development ease vs minimal packaged output.
- pm7 7y ago> given that all of the nginx files are not in a single directory it's my understanding that you'd need multiple COPY commands Workaround would be to move these files to one directory on host, COPY it in one command to /tmp (or even better, /dev/shm or other ramdisk) and then use script to distribute files where needed.
- chatmasta 7y agoYou can make the multi-stage builds actual images themselves, and setup your CI to auto push them to a registry. Then you can have shared multistage builds, which is pretty useful for things like compiling static libraries in their own images, and COPYing them into images that statically link to them.