Share your love
Start a Docker Container with Exited Status – 3 Easy Steps

In this guide, we want to show you how to Start a Docker Container with Exited Status. A Docker Container is a model of a Docker image that can do different tasks inside the container. The Docker Container has different states or statuses. Once you want to check your Docker container is up and running, you will get the status of it. One of these statuses is Exited. When you get this status, you will not be able to run the container with the Docker Exec command. So what should we do? You can proceed to the following steps on the Orcacore website to see how you can do it.
Table of Contents
Quickly Start a Docker Container with Exited Status
In this guide, we will show you an example of the exited status of a container and teach you how you can Start a Docker Container with Exited Status. To do this, follow the steps below.
Note: To get a Docker installation and configuration guide, you can visit the Docker Tutorials.
Step 1 – Check the Docker Container State
First, we check our docker container status by using the command below:
docker ps -a
Example Output:

As you can see in the above example, we have an exited status for our container. Let’s see the reasons that caused this to happen.
Step 2 – Why Do You Get Docker Exited Status?
Once the process inside the container terminates, you will get the Exited status. In this case, no CPU and memory are consumed by the container. Many reasons may cause this to happen including:
- The process inside the container was completed, and so it exited.
- The process inside the container encountered an exception while running.
- A container is intentionally stopped using the docker stop command.
- No interactive terminal was set to a container running bash.
As we said, in this case, the container can not be accessed with the Docker Exec command.
Step 3 – Start an Exited State Container
At this point, you can easily use the docker start command with your container name to start a Docker Container with Exited Status. For example, our container name is sql1, to start it, we use the command below:
docker start sql1
Again check the container status:
docker ps -a
We should see that our container is up and running:

Alternatively, you can use the following command:
docker start `docker ps -q -l`
This command will only get the latest docker container.
To start all the containers, you can use the following command:
docker start `docker ps -q -a`
That’s it, now you can run the docker exec command to access your container.
For more information, you can visit the official Documentation page.
Conclusion
At this point, you have learned to Start a Docker Container with Exited Status. As you saw, with exited status you can not access the container with the docker exec command, you should start your container. Hope you enjoy it.
Also, you may like to read the following articles:
MS SQL Server Setup with Docker on RHEL 9
Install MySQL in Docker Container on Debian 12
Install Docker Desktop on Windows
FAQs
What does it mean when a Docker container has an “Exited” status?
As we said in the guide steps, a Docker container with an “Exited” status means the container has stopped running, typically after completing its process or due to an error. The exit code provides details about why the container exited.
Why does my Docker container exit immediately after starting?
A Docker container will exit immediately if the main process inside the container finishes or encounters an error. If your container runs a script or command that completes execution quickly, the container will stop unless you specify a continuous task, like starting a server.
How do I restart a Docker container in an “Exited” status?
To restart a container that has exited, use the following command:docker start
This will start the container again in its current state.