docker exec -u root myapp bash

Category: Docker

docker exec -u root myapp bash

Open a shell inside a container as the root user

Opens a shell as the root user inside a container — overrides the default user with -u root.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.