Is it safe to run docker container in production as root?

How safe it is to run docker container as root user in production environment ? Is this standard practice or it is recommended to run docker container as non root user ?

Edit :

  • Embed code in docker container or mount it as a volume?
  • Webpack, core, docker: building webpack with dotnet debug or release build
  • How can i view my dockerized container app that i just set up on Azure?
  • composer cannot allocate memory inside container docker
  • Can I connect VisualVM to remote Java process in Docker without exposing the RMI port as itself?
  • Error run scrapy after install docker
  • My question assumes running docker daemon, docker client and application inside docker as root ( everything as root docker server, client and application inside container )

  • Python logging class in Docker: logs gone
  • Can I use Docker for production deployment of a Rails application?
  • Adding config file in docker run command
  • Build docker image with jetty - when should I build?
  • How to launch existing Wordpress app image with Docker not at default 80 port?
  • Which approach is better for discovering container readiness?
  • One Solution collect form web for “Is it safe to run docker container in production as root?”

    It is safer, and better practice, to run as non-root, both in docker and non-docker environments. However, running as root within a docker container is at least somewhat less dangerous than running as root directly in the primary OS, but definitely for a production system running as root is pretty much unheard of by any company with even the most basic security concerns.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.