Home  >  Q&A  >  body text

After docker exits a container, how to enter the container again?

I ran docker run -it and installed openjdk, and then I exited. How can I enter the original container again?

滿天的星座滿天的星座2736 days ago746

reply all(3)I'll reply

  • 阿神

    阿神2017-05-16 13:19:41

    docker exec -it {dockerId} /bin/bash

    reply
    0
  • ringa_lee

    ringa_lee2017-05-16 13:19:41

    First use docker ps -a to find the corresponding stopped container id, and then use docker start -ia <containerid> to start the container

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 13:19:41

    docker attach your_container_name

    reply
    0
  • Cancelreply