This page was converted from my old blog and hasn't been reviewed. If you see an error please let me know in the comments.
Quick overview presentation I did on Dockerfiles. Includes some best practices.
use .dockerignore to avoid adding unnecessary files to your image
Don’t run apt-update on a single line. This will cause caching issues if the referenced archive gets updated, which will make your subsequent apt-get install fail without comment.
Avoid installing unecessary packages
Always use version tags in FROM statements. Avoid :latest
Avoid run + commit, use a Dockerfile instead
Installing ssh into a container is not clever
One Process per container
Leverage and understand the cache