This document provides best practices for using Docker containers, including:
- Using "dumb-init" or "supervisord" to run multiple services in a container.
- Using named volumes over host volumes whenever possible as named volumes can be directly controlled and backed up easily.
- Writing useful entrypoint scripts to address startup issues when linking containers.
- Avoiding using the root user when possible for security.
- Techniques for reducing Docker image sizes such as using smaller base images, removing cache files and temporary packages, and combining Dockerfile commands.
The document also discusses Docker security topics like authenticating images, dropping unnecessary privileges, limiting resource consumption, and reducing large attack surfaces