Sunday, May 26, 2019

SSH into a running Linux container - docker

Looking for extensive set of commands, refer

 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:

Installing Octave in Ubuntu running on Docker

I want to run Octave on Ubuntu running on docker.  Simple stuff but still manage to get errors and had to spend  few minutes on fine-tuning ...