Docker运行vs创建

docker run和docker创建命令有什么区别?

我通常使用运行,但有时在我看到创建的文档。

Docker的–help告诉

create    Create a new container
run       Run a command in a new container

这是否意味着在需要将命令传递给新容器时使用run?那么创建的目的是什么?

从码头documentation

The docker create command creates a writeable container layer over the
specified image and prepares it for running the specified command. The
container ID is then printed to STDOUT. This is similar to docker run
-d except the container is never started. You can then use the docker start command to start the container at any point.

This is useful when you want to set up a container configuration ahead
of time so that it is ready to start when you need it. The initial
status of the new container is created.

http://stackoverflow.com/questions/37744961/docker-run-vs-create

本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:Docker运行vs创建