Guides

Docker image security checklist

Updated 2026-11-17

Short answer

Before a Docker image goes to production, check its base image, the user it runs as, what is installed, what was left behind and where it came from. The ten checks below cover the problems that show up most often.

The checklist

  1. Use a supported base image and pin it to a version or digest.
  2. Do not run as root. Set a USER in the Dockerfile.
  3. Keep secrets out of the image: no .env files, keys or tokens in any layer or environment variable.
  4. Leave build tools out of the final image. Use a multi-stage build.
  5. Update the packages with known vulnerabilities that apply to you.
  6. Avoid curl piped to a shell and remote ADD in the Dockerfile.
  7. Check that package files have not been modified compared with the official package.
  8. Look for binaries that belong to no package and find out what they are.
  9. Check the licence of what you ship.
  10. Scan again whenever the image changes, and when a new vulnerability is published.

How scancontainer helps

scancontainer runs these checks on every scan and tells you which Dockerfile line causes each problem. Checks 7 and 8, integrity and unowned binaries, are done file by file against the official signed packages.

More guides

Scan yours before the next deploy.