What is the purpose of the USER instruction in a Dockerfile?

Docker Fundamentals Medium

Docker Fundamentals — Medium

What is the purpose of the USER instruction in a Dockerfile?

Key points

  • USER instruction sets the user for subsequent instructions
  • Enhances security by running containers as non-root
  • Improves container isolation and protection

Ready to go further?

Related questions