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



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



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.

转载注明原文:Docker运行vs创建 - 代码日志