During running a Container, sometime we want to access to this Container to edit, check something. So, how can we do that? In this tutorial, I will show you how to do that.
OK…
First of all, you need check the Container which we want to access, what is its id? By the command as below:
1 |
docker ps -a |
Example, I have some running Container as below:
As you see, the Container with id b9e242f0d7d3 is a running Container in my computer.
Now, I will use a command to access to this Container. Syntax of this command as below:
1 |
docker exec -it <container_id> /bin/bash |
with container_id is id of the Container which you want to access in.
After executing this command, you can manipulate this Container immediately.
Example: