Q
Q
qovalenko2018-08-31 10:17:06
Docker
qovalenko, 2018-08-31 10:17:06

How to connect to a spent container?

I know that if you run any docker image, it will run and terminate and not terminate if any service is started.
Is there any way to run and connect to the spent container?
after running docker start container, docker terminates and I don't have time to attach?
The option with run -it images /bin/bash does not suit me, I just need to attach to the stopped container.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2018-08-31
@qovalenko

Commit the container image to image - and start from it
Output of all, including stopped containers:
Look there for CONTAINER_ID and commit it to the image:
Well, start the image as usual so that it stays online:
Well, then you fall into the running container like this:
And then do whatever you want...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question