Tuesday, January 17, 2017

Login to a running docker container


How to login to a running container?

First get the docker id using this command:
 $ docker ps
CONTAINER ID ...
feb8867e1fd9 ...

Then, run bash process inside the corresponding container id.
$ docker exec -it  <feb8867e1fd9> bash

Where options:
             -i interactive
             -t allocate a pseudo-TTY.

[root@feb8867e1fd9 /]# [root@feb8867e1fd9 /]# 

We are inside the container now :)

No comments:

Post a Comment