How to continue running a docker container which is already exited

0 votes
docker run -it ubuntu

I used Ctrl+D to exit it but I want to continue executing this container.

Jul 19, 2018 in Docker by Tyrion anex
• 8,700 points
2,526 views

1 answer to this question.

0 votes

Restart an existing container after you exited it, this will save your previous logs.

Follow the below commands:

docker start  `docker ps -q -l` (restarts the container in the background)
docker attach `docker ps -q -l` (reattaches the terminal & stdin)
answered Jul 19, 2018 by Sophie may
• 10,620 points

Related Questions In Docker

+1 vote
7 answers

How to connect to a Docker container running mysql on Windows 10?

Avoid using bind_address in your my.cnf file. I don't ...READ MORE

answered Apr 25, 2019 in Docker by Haseeb
12,596 views
0 votes
1 answer
0 votes
0 answers

How to know if docker is already logged in to a docker registry server

I'm not sure whether I've already used ...READ MORE

Apr 12, 2022 in Docker by Abhijeet
• 180 points
1,951 views
+4 votes
4 answers

How To Access a Service on Host From a Docker Container?

Adding to kalgi's answer, You can also ...READ MORE

answered Oct 16, 2018 in Docker by lina
• 8,220 points

edited Oct 16, 2018 by lina 34,090 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,060 points
2,693 views
0 votes
1 answer

How to run a docker command from inside the container?

You must have come across the /var/run/docker.sock file, ...READ MORE

answered Jun 28, 2018 in Docker by Sophie may
• 10,620 points
3,493 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP