Created
March 3, 2017 01:52
-
-
Save 7rin0/ea890d2d4bf25a890b86aff01290e7d0 to your computer and use it in GitHub Desktop.
Docker exec root or default user
This file contains hidden or 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
# Root. | |
$ docker exec -u 0 i -t {container_id/image_name} bash | |
or | |
# Default container's user. | |
$ docker exec i -t {container_id/image_name} bash |
Thank you! But #Root line should be:
$ docker exec -u 0 -it {container_id/image_name} bash
Thanks!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! I think there's a little mistake. It should be this way:
docker exec -it {container_id/image_name} bash