Is it possible to install a container with STATUS "Exited (-1)"?

As a result, I can not start it or attach to it:

$ sudo docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 17d34ecd8c24 ubuntu:latest "bash" 2 hours ago Exited (-1) 27 minutes ago fervent_kowalevski ... $ sudo docker start 17d34ecd8c24 Error response from daemon: Cannot start container 17d34ecd8c24: [8] System error: Unit docker-17d34ecd8c24ffcc9392735710b56ee9bab1cc62237f152114017fe6f92c3fcb.scope already exists. FATA[0000] Error: failed to start one or more containers $ sudo docker attach 17d34ecd8c24 FATA[0000] You cannot attach to a stopped container, start it first 

Is there anything I can do to fix this?

+6
source share
1 answer

Could this be due to https://github.com/docker/docker/issues/7015 ? Mark the comment https://github.com/docker/docker/issues/7015#issuecomment-52522196 for a workaround.

For your specific error, you will do something like:

 $ systemctl stop docker-17d34ecd8c24ffcc9392735710b56ee9bab1cc62237f152114017fe6f92c3fcb.scope 

Then try running the container again. However, if you run this container as a bash shell in interactive mode, you will not be able to launch it and then attach to it since the shell will exit immediately. You will need to add -a (attach) and -i (interactive) to the docker start .

+3
source

Source: https://habr.com/ru/post/986251/


All Articles