Options: -f, --file FILE 指定compose配置文件,默认为指定目录下的docker-compose.yml文件 (default: docker-compose.yml) -p, --project-name NAME 指定项目名称,默认为目录名 (default: directory name) --profile NAME 指定要启用的配置文件 -c, --context NAME 指定上下文名称 --verbose 显示详情 --log-level LEVEL 指定log级别,可选参数DEBUG, INFO, WARNING, ERROR, CRITICAL --ansi (never|always|auto) 控制何时打印ANSI控制字符 -H, --host HOST 指定守护进程主机名Daemon socket --tls Use TLS; implied by --tlsverify --tlscacert CA_PATH Trust certs signed only by this CA --tlscert CLIENT_CERT_PATH Path to TLS certificate file --tlskey TLS_KEY_PATH Path to TLS key file --tlsverify Use TLS and verify the remote --skip-hostname-check Don't check the daemon's hostname against the name specified in the client certificate --project-directory PATH 指定工作目录,默认为compose文件所在的目录 (default: the path of the Compose file) --env-file PATH 指定容器系统环境变量文件
Commands: build Build or rebuild services config Validate and view the Compose file down Stop and remove resources events Receive real time events from containers exec Execute a command in a running container help Get help on a command images List images kill Kill containers logs View output from containers port Print the public port for a port binding ps List containers pull Pull service images push Push service images restart Restart services rm Remove stopped containers run Run a one-off command start Start services stop Stop services top Display the running processes pause Pause services unpause Unpause services up Create and start containers version Show version information and quit