MitchTalmadge / AMP-dockerized

CubeCoders AMP in a Docker Image. Easily create game servers for games like Minecraft, GMod, TF2, Factorio, and StarBound!
https://hub.docker.com/r/mitchtalmadge/amp-dockerized
Other
91 stars 22 forks source link

Docker "Best Practices" #32

Closed Joly0 closed 4 years ago

Joly0 commented 4 years ago

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.

MitchTalmadge commented 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

Joly0 commented 4 years ago

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.

MitchTalmadge commented 4 years ago

Thanks it's great!