Closed Joly0 closed 4 years ago
Thanks! I will look this over more once I get time to test it. I have a busy week :P
for example to a Run one-liner
The reason I avoid doing everything in a single RUN
command is because it allows sections of the image to be cached, which is helpful while developing it or deploying it. This is documented here too: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#use-multi-stage-builds
Alright. Yeah, the mutli stage builds are usefull to develop, deploy and minimize the image, but the advantage is only archieved, when you copy everything you build to a new scratch image at the end.
Thanks it's great!
I guess this should cover most of the best practices. This could be further improved overall, for example to a Run one-liner, but thats ok for now. "apt-get -y autoremove --purge" might be a bit overkill, but we´ll see.