Question · NestJS course · Module 12: Containers and CI/CD

Review: Non-root user in Dockerfile

Why do we create a non-root user in a production Dockerfile?

Answer options

  • To make the container start faster
  • To make the image smaller
  • To enable multi-threading
  • To limit potential damage in case of a breach

You can check the correct answer by solving this task in the CodeWorlds game.