• Open bash session into a docker container

    Once a docker container is started, it’s always hard to get access into and see what’s happening inside. As a workaround, the easiest way to understand what’s happening in a container is to get a CLI on it and investigate.

    Since version 1.3, you can easily open a bash session into a running container by using:

    • The ID of the container:
      sudo docker exec -i -t 43f10328e4e9 /bin/bash
      
    • Or the name of the container:
      sudo docker exec -i -t super_docker /bin/bash
      

    You will get access with a bash session to your container:

    $ root@43f10328e4e9:/#