Docker Community Forums

Share and learn in the Docker community.

Docker Container isn't startirng


(Gruposalatielmatheus) #1

Good Morning, i’m having trouble with docker that is running in AWS, when i try to start the container i receive the error bellow.


(Sam) #2

start only works with containers that have been stopped… not exited…

(Gruposalatielmatheus) #3

Ok, but then i try to execute the command i get this:

(David Maze) #4

That’s not an especially enlightening error (and it’s hard to read in the screen shot). You might try docker rm both containers and starting them again from scratch.

(David Maze) #5

(It looks like the containers were created quite a while ago, so if it’s not obvious, if you had any significant data stored in the container and not in a volume, this will delete it.)

(Bryce Ryan) #6

The command you are executing

service docker status

only provides the status of the docker daemon. It does nothing related to running, starting, or stopping containers.

The previous poster was suggesting a command like this
docker container run <-it|-d> <container id>
which actually runs a container, as opposed to trying to start an exited container.

I hope this helps.

(Sam) #7

right… there are three commands here

docker run - start container for 1st time
docker stop container… stops, but does not cause container to exit
docker start container, which resumes a container that had docker STOP issued on it

and there is docker kill which terminates a container… the container is not restartable.
and if it was initially started (doker run) with --rm, then the container instance is destroyed (auto docker rm) on exit.

docker status will show you the container current state. (running, stopped, exited)

(Satwikbanerjee) #8

HI @gruposalatielmatheus Can you please paste output of docker ps -a | grep 1db446075cb0

You can also try to activities here.
docker start 1db446075cb0 will simply start a container.

You can export the container to a new image and import back and start with a different name. Obviously if there were previous volumes mapped to this then you will have to map them again.


(Santhy) #9

docker start <CONTAINER_ID> try this command…

(Goffinf) #10

How about:

docker logs your-container-id