SSH Into A Docker Container
Last updated
Was this helpful?
Last updated
Was this helpful?
Before you can SSH into a Docker container, you need to know the name of the container.
Run
to list the currently running containers and find the name of the one you want to connect to. If you don't see the one you are looking for, it may not be running.
Then, you can connect to it by name with a bash session like so:
The flags open an interactive emulated terminal connection. /bin/bash
is the command that gets run in that context.