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.
start only works with containers that have been stopped… not exited…
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.
(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.)
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.
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)
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.
docker start <CONTAINER_ID> try this command…
docker logs your-container-id