Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to go to a running docker container

# to get the name of the existing container
$docker ps 
# Command to get a bash shell in the container
$docker exec -it <container name> /bin/bash 
# to execute whatever command you specify in the container.
docker exec -it <container name> <command> to execute whatever command you specify in the container.
Source by phase2.github.io #
 
PREVIOUS NEXT
Tagged: #running #docker #container
ADD COMMENT
Topic
Name
9+4 =