[root@node1 compose]# docker-compose --helpDefine and run multi-container applications with Docker.#使用docker,定义运行多容器应用
Usage:
docker-compose [-f <arg>...][options][COMMAND][ARGS...]
docker-compose -h|--help
#格式
Options:
-f,--file FILE Specify an alternate compose file|指定一个可选的Compose yaml文件(默认:docker-compose.yml)
(default: docker-compose.yml)-p,--project-name NAME Specify an alternate project name|指定项目名称(默认:当前目录名称)
(default: directory name)--verbose Show more output|展示更多信息
--log-level LEVEL Set log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)|设置日志等级
--no-ansi Do not print ANSI control characters
-v,--version Print version and exit|打印版本信息并且退出
-H,--host HOST Daemon socket to connect to|连接守护进程套接字
--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 Specify an alternate working directory
(default: the path of the Compose file)--compatibility Ifset, Compose will attempt to convert deploy
keys in v3 files to their non-Swarm equivalent
Commands:
build Build or rebuild services|构建或者重建服务
bundle Generate a Docker bundle from the Compose file
config Validate and view the Compose file|验证和查看配置文件,可以将配置信息显示出来
create Create services|创建服务
down Stop and remove containers, networks, images, and volumes|停止并且删除容器、服务、网络设置、镜像、数据卷
events Receive real time events from containers|从容器接收时时的事件
exec Execute a command in a running container|给正在运行的容器执行一条命令
help Get help on a command|帮助信息
images List images|显示使用的镜像
killKill containers|强制停止服务容器
logs View output from containers|容器的输出信息
pause Pause services|暂停服务
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|执行一次性的命令
scale Set number of containers for a service|设置服务需要启动的容器数量