Skip to content
IT related

Executing commands in a container.

Updated 1 min read

On this page 1 section
  1. Remote into a docker container

Remote into a docker container

Information about Docker.

This command will execute you into a terminal session inside of the docker conatiner.

docker container exec -it containerID /bin/bash

Run this command instead to execute a command inside the docker conatiner. This will list the contents of the /var folder

docker container exec -it my_mysql ls /var

Accessing the container ID.

You can get the container ID by running;

sudo docker ps -a

This will show you all the containers (running or not) that are on the system you can use the container name (if you gave it one) or the container ID to run the above commands.

IT related RSS feed Published with Oblish

Keyboard shortcuts

/
Search
[
Previous page
]
Next page
?
Show this list
Esc
Close