This guide is a consortium of best practices to follow when writing Dockerfile files.
- Use official Docker images
- Run as non-root user
- Do not use
latest
tags - Use
image
tags as git tags - Use COPY (be specific when possible), not ADD
- Avoid installing unnecessary dependencies
- Each container should have only one responsibility