In this blog post, I will show you how to create a Docker container without running in after the command is completed.
When we use the Docker run command, in the background, Docker is running the following two command:
If we want to create a container without running it immediately, we can use the Docker Create command below.
docker container create --name appserver python
The command will create a container called appserver using the Python Docker image.
If I run docker ps I won’t see it because it is not running.
To start it, I will use the command below:
docker start appserver
As you can see below, the container is now running.