Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 942 Bytes

building-container.md

File metadata and controls

21 lines (16 loc) · 942 Bytes

Guidelines for Building a Container

Dockerfile Examples

Note: These may not perfectly match Dockerflow as the spec is a current WIP

Dockerfile Guidelines

  • Put the application into /app within the container
  • Set a non-root user and group app in the container and run everything as this user
    • make the uid for the user 10001
    • make the guid for the group 10001
  • Use the Docker's base containers for a language.
  • Build the smallest container you can
  • Optimize for cachability. Put commands that make fewer changes (apt-get, pip install, npm install) earlier in the Dockerfile.