I am bit confused on the status of the docker container, especially with status as CREATED.
I know that when the container is running state it shows as below:
root@labadmin-VirtualBox:~/RAGHU/DOCKER# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1261afc2acc1 302fa07d8117 "/bin/bash" 43 minutes ago Up 43 minutes optimistic_thompson
And if the container is stopped, it shows as below:
root@labadmin-VirtualBox:~/RAGHU/DOCKER# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 935f902efac7 302fa07d8117 "/bin/bash" 44 minutes ago Exited (0) 44 minutes ago competent_golick 5eb1c2525e2e 302fa07d8117 "/bin/bash" 44 minutes ago Exited (0) 44 minutes ago friendly_saha
My confusion is in what state does the docker shows the status of the container as CREATED:
root@labadmin-VirtualBox:~/RAGHU/DOCKER# docker ps -a | grep -i created CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 01c63f92586b jenkins "/bin/tini -- /usr..." 5 weeks ago Created gloomy_jones
Docker status Created means that the container has been created from the image, but it has never been started. This state can be achieved in this two ways. Docker container has been created using docker create command (this is done to speed up container creation).
The docker container create (or shorthand: docker create ) command creates a new container from the specified image, without starting it. When creating a container, the docker daemon creates a writeable container layer over the specified image and prepares it for running the specified command.
Docker creates a new container, as though you had run a docker container create command manually. Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.
A Docker image is a read-only template that contains a set of instructions for creating a container that can run on the Docker platform. It provides a convenient way to package up applications and preconfigured server environments, which you can use for your own private use or share publicly with other Docker users.
Docker status Created
means that the container has been created from the image, but it has never been started.
This state can be achieved in this two ways.
Docker container has been created using docker create
command (this is done to speed up container creation).
Docker container has been created using docker run
but it hasn't been able to start successfully.
For further information check docker create
reference: https://docs.docker.com/engine/reference/commandline/create/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With