How can I get docker container root's password?
[root@localhost train02]# docker exec -it jenkins /bin/bash [jenkins@89d5aa94e6ec /]ls /root ls:cannot open directory /root: Permission denied
When you use the docker login command, your credentials are stored in your home directory in . docker/config. json . The password is base64-encoded in this file.
The user name is jovyan and the password is jupyter .
Docker containers are designed to be accessed as root users to execute commands that non-root users can't execute. We can run a command in a running container using the docker exec. We'll use the -i and -t option of the docker exec command to get the interactive shell with TTY terminal access.
If you're using the docker (>=1.7.0), please pass -u
option to docker exec
:
docker exec -it -u root jenkins /bin/bash
It'll run /bin/bash as root user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With