Tools, FAQ, Tutorials:
"docker container create --name" - Name Container
How to create a new container with a name from an image with "docker container create --name" command?
✍: FYIcenter.com
If you create a new container with default options, it will be given a random name.
You should use the "--name" to provide your own name.
1. Create a new container with random name.
fyicenter$ docker container create hello-world 36f6b8231c204b16d1909f7c9f4d74954e77258965f96b4c9602911d0e677a94
2. List containers from the "hello-world" image.
fyicenter$ docker container list --all CONTAINER ID IMAGE COMMAND CREATED STATUS NAMES 36f6b8231c20 hello-world "/hello" 4 minutes ago Created reverent_archimedes 9561c6fa283a hello-world "/hello" 21 minutes ago Exited (0) 10 minutes ago naughty_chaum ...
3. Create a new container with a given name.
fyicenter$ docker container create --name my_hello hello-world a62f06be48390e7237529268bf9a00171df3c99f58d7a0f0502b6b4df4f579fd
3. List containers from the "hello-world" image.
fyicenter$ docker container list --all CONTAINER ID IMAGE COMMAND CREATED STATUS NAMES a62f06be4839 hello-world "/hello" 5 seconds ago Created my_hello 36f6b8231c20 hello-world "/hello" 8 minutes ago Created reverent_archimedes 9561c6fa283a hello-world "/hello" 25 minutes ago Exited (0) 14 minutes ago naughty_chaum ...
As you can see, we can create many containers from the same image and name them any way you want.
⇒ "docker container create --tty" - TeleTYpewriter Terminal
⇐ "docker container create image_name" Command
2019-03-25, 1039🔥, 0💬
Popular Posts:
How to use the "set-body" Policy Statement for an Azure API service operation? The "set-body" Policy...
How to use the "Ctrl-p Ctrl-q" sequence to detach console from the TTY terminal of container's runni...
How to detect errors occurred in the json_decode() call? You can use the following two functions to ...
What is EPUB 3.0 Metadata "dc:publisher" and "dc:rights" elements? EPUB 3.0 Metadata "dc:publisher" ...
Where to find tutorials on PHP language? I want to know how to learn PHP. Here is a large collection...