Last active
August 9, 2024 04:45
-
-
Save camallen/4c5a15a10743057331ad8ee2833cd403 to your computer and use it in GitHub Desktop.
How to run a cmd in docker as a different or root user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker | |
docker exec -it -u0 containerid bash | |
# compose | |
docker compose run --rm -u0 serviceid bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment