How to SSH to docker container running in Ubuntu Linux
Dung Do Tien
Dec 05 2020
174
I have a Linux server installed Ubuntu 18, Now I want from this sever access to a docker container is running in this server to execute some command but I don't know how to ssh to docker container?
Thank you for any suggestion.
Have 1 answer(s) found.
-
0
To access to docker container we have a syntax as below:
docker exec -it <container name> /bin/bash
To get
<Container name>
you can rundocker ps
command to list all docker containers in your server, you will see NAMES column.Sandeep Kumar Dec 05 2020
If this answer is useful for you, please BY ME A COFFEE!!! I need your help to maintain blog.
* Type maximum 2000 characters.
* All comments have to wait approved before display.
* Please polite comment and respect questions and answers of others.