symfony-docker icon indicating copy to clipboard operation
symfony-docker copied to clipboard

Best Practices for Running Containers as Non-Root in Production?

Open MichaelBrauner opened this issue 2 years ago • 2 comments

First off, thank you for providing such a valuable tool in the Symfony Docker setup.

I came across the "running as root" topic in the containers.

While I understand the simplicity it provides, especially during development, I'm curious about the recommended approach for production environments.

From the discussions I've seen, there seems to be a mix of practices. Some people seem to be comfortable running as root, while others try to set up a non-root user, facing various challenges in the process.

Could you shed some light on what you consider to be best practices for production? Specifically:

  • Do you generally recommend running the containers as root in production or is there a preferred, safer method? If the recommendation is to run with a non-root user, do you have any guidance or documentation on setting this up seamlessly?

  • I truly believe that a clearer understanding of this would benefit many in the community, ensuring safer deployments and configurations.

Thank you in advance for your time and insights.

MichaelBrauner avatar Aug 14 '23 22:08 MichaelBrauner