How can I get the password of the docker root container?
[ root@localhost train02]# docker exec -it jenkins /bin/bash [ jenkins@89d5aa94e6ec /]ls /root ls:cannot open directory /root: Permission denied
If you are using docker ( > = 1.7.0 ), go -u to docker exec :
-u
docker exec
docker exec -it -u root jenkins /bin/bash
It will run / bin / bash as the root user.