"docker container create" - Create Container
How to create a new container from an image with "docker container create" command?
You can create a new container from an image with "docker container create" command by giving the image name.
1. Get the image name with the "docker image list" command.
$ docker image list | grep hello-world hello-world latest fce289e99eb9 4 months ago 1.84kB
2. Create a new container with the image name.
$ docker container create hello-world 9561c6fa283a5933987582405212cbfcc27fa3c1149c687e99e53a963ceebd2d
3. Check for the latest containers.
$ docker container list --latest CONTAINER ID IMAGE COMMAND CREATED STATUS NAMES 9561c6fa283a hello-world "/hello" 16 seconds ago Created naughty_chaum
4. Start for the container by its name.
$ docker container start naughty_chaum naughty_chaum $ docker container list --latest CONTAINER ID IMAGE COMMAND CREATED STATUS NAMES 9561c6fa283a hello-world "/hello" 50 seconds ago Exited (0) 17 seconds ago naughty_chaum
As you can see, we have created a new container and started it on the Docker Engine. The container stopped by itself without any error.
2019-04-06, 400👍, 0💬
How to Test API as a Publisher Administrator? You can follow this tutorial to test an API operation ...
What is Azure API Management Publisher Dashboard? Azure API Management Publisher Dashboard is an Azu...
How to create Hello-3.1.epub with WinRAR? I have all required files to create Hello-3.1.epub. To cre...
What is the "__init__()" class method? The "__init__()" class method is a special method that will b...
How to add request URL Template Parameters to my Azure API operation to make it more user friendly? ...