Tools, FAQ, Tutorials:
"docker container create image_name" Command
How to create a new container from an image with "docker container create image_name" command?
✍: FYIcenter.com
You can create a new container from an image with "docker container create image_name" command by giving the image name.
1. Get the image name with the "docker image list" command.
fyicenter$ docker image list | grep hello-world hello-world latest fce289e99eb9 4 months ago 1.84kB
2. Create a new container with the image name.
fyicenter$ docker container create hello-world 9561c6fa283a5933987582405212cbfcc27fa3c1149c687e99e53a963ceebd2d
3. Check for the latest containers.
fyicenter$ 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.
fyicenter$ docker container start naughty_chaum naughty_chaum fyicenter$ docker container list --latest CONTAINER ID IMAGE COMMAND STATUS NAMES 9561c6fa283a hello-world "/hello" 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.
⇒ "docker container create --name" - Name Container
⇐ "docker container create" - Create Container Command
2019-04-06, 1246🔥, 0💬
Popular Posts:
How to access Query String parameters from "context.Request.Url.Que ry"object in Azure API Policy? Q...
What Is Azure API Management Service? Azure API Management as a turnkey solution for publishing APIs...
What are "*..." and "**..." Wildcard Parameters in Function Definitions? If you want to define a fun...
Why I am getting "The Windows SDK version 8.1 was not found" error, when building my C++ application...
How To Use an Array as a Queue in PHP? A queue is a simple data structure that manages data elements...