Docker Tutorial · Production Practices · Lesson 26 of 26

Where to Go Next

Production courses, Kubernetes, and practice for what you've learned about Docker.

Create a free account to save this page, take notes and track your progress. Sign in

You've covered

  • Containers, images, layers and the container lifecycle
  • Dockerfiles, caching, .dockerignore, multi-stage builds, base images, ENTRYPOINT and CMD, ARG and ENV
  • Tags, digests and registries
  • Volumes, bind mounts, networks and published ports
  • Docker Compose with healthchecks, environment files and profiles
  • Non-root and read-only containers, resource limits, healthchecks, restart policies and cleanup

Keep going

A production image checklist
echo "Checklist for a production image:"
for item in "pinned base image" "multi-stage build" ".dockerignore" "non-root USER" "exec-form CMD" "HEALTHCHECK" "no secrets in layers"; do
  echo "  [x] $item"
done

Output

Checklist for a production image:
  [x] pinned base image
  [x] multi-stage build
  [x] .dockerignore
  [x] non-root USER
  [x] exec-form CMD
  [x] HEALTHCHECK
  [x] no secrets in layers

Run this on your computer — see “Get Started” for setup.

Was this page helpful?