Sunday, May 26, 2019

SSH into a running Linux container - docker

Looking for extensive set of commands, refer
http://phase2.github.io/devtools/common-tasks/ssh-into-a-container/


 In summary, use below commands as specified in article

  • Use docker ps to get the name of the existing container
  • Use the command docker exec -it {containername} /bin/bash to get a bash shell in the container
  • Generically, use docker exec -it {containername} {command} to execute whatever command you specify in the container.

running docker as root user 
docker exec -it --user root {container id} /bin/bash

No comments:

Gray Failures: What is it and how to detect one?

If you are reading this article , i guess you are curious to know about gray failures and different methods to detect gray failures.  Hopefu...