Docker Community Forums

Share and learn in the Docker community.

How to restart a dead container

Hello,

I have 4 containers that died without any reason.
Can someone know how can I restart them again (bring them to life :slight_smile: )?

Thank you very much!!!
Daniela

List all containers including exited ones:
docker ps -a

Start existed container:
docker start {container id or name}

I would suggest to make yourself aquinted with this self paced docker training.

Thank you for your replay, but I asked for a dead container.
Just Docker start is not working.

Thank you anyway.
Daniela

dead. I was refering to dead as in exited. Now I am currious what you mean with “dead conatainer”.

Like on the next picture :

Oh, I learned something new today: You are right, dead actualy realy is a container state:https://success.docker.com/article/what-is-the-difference-between-dead-and-exited-containers

I am currious how this one will play out. I have never seen dead containers on my systems in the past 4 years. On the other side containers are intended to be ephemeral.Delete and recreate them - of course this only applies if persistent state is written into volumes.

All my data is on a separate volumes.
We can recreate the containers but I was wandering if we can resuscitate a dead container :slight_smile:
I guess not.

Have a nice day,
Daniela

Hi Daniela,

I have an idea once you start your container for some seconds till be active …

Once it’s active you try using

docker container exec container id sleep 1d

If this helps