"Lecture: Creating our First Image" ,

in this lecture, you ran the container using
docker run -it ubuntu:xenial /bin/bash
and then you exited from the container
you grabbed the container name and started it, and then you were able to attach to it.

however in my case the following is the behaviour, please suggest:

after restarting it, there is nothing in docker ps print and thus i cannot attach to it.

this is a random behaviour, i was abler to attach once


  • post-author-pic
    Sean G
    09-20-2018

    if the container is not running, you will need to include the -a flag to show stopped containers as well.

Looking For Team Training?

Learn More