4-Docker命令之docker create

1.docker create介绍

docker create命令是用于创建一个新的容器,等价于docker run -d命令,但是与docker run -d不同的是,docker create创建的容器并未实际启动,需要指定docker start命令启动。

2.docker create用法

docker create [参数]

[root@centos79 ~]# docker create --help

Usage:  docker create [OPTIONS] IMAGE [COMMAND] [ARG...]

Create a new container

Aliases:
  docker container create, docker create

Options:
      --add-host list                  Add a custom host-to-IP mapping (host:ip)
      --annotation map                 Add an annotation to the container (passed through to the OCI
                                       runtime) (default map[])
  -a, --attach list                    Attach to STDIN, STDOUT or STDERR
      --blkio-weight uint16            Block IO (relative weight), between 10 and 1000, or 0 to disable
                                       (default 0)
      --blkio-weight-device list       Block IO weight (relative device weight) (default [])
  

你可能感兴趣的:(docker,docker)