命令帮助

  1. $ docker-compose --help
  2. Define and run multi-container applications with Docker.
  3. Usage:
  4. docker-compose [-f <arg>...] [options] [COMMAND] [ARGS...]
  5. docker-compose -h|--help

参数

  1. Options:
  2. -f, --file FILE Specify an alternate compose file
  3. (default: docker-compose.yml)
  4. -p, --project-name NAME Specify an alternate project name
  5. (default: directory name)
  6. --verbose Show more output
  7. --log-level LEVEL Set log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
  8. --no-ansi Do not print ANSI control characters
  9. -v, --version Print version and exit
  10. -H, --host HOST Daemon socket to connect to
  11. --tls Use TLS; implied by --tlsverify
  12. --tlscacert CA_PATH Trust certs signed only by this CA
  13. --tlscert CLIENT_CERT_PATH Path to TLS certificate file
  14. --tlskey TLS_KEY_PATH Path to TLS key file
  15. --tlsverify Use TLS and verify the remote
  16. --skip-hostname-check Don't check the daemon's hostname against the
  17. name specified in the client certificate
  18. --project-directory PATH Specify an alternate working directory
  19. (default: the path of the Compose file)
  20. --compatibility If set, Compose will attempt to convert deploy
  21. keys in v3 files to their non-Swarm equivalent

命令

  1. Commands:
  2. build Build or rebuild services
  3. config Validate and view the Compose file
  4. create Create services
  5. down 停止并删除容器、网络、镜像和数据卷
  6. events Receive real time events from containers
  7. exec Execute a command in a running container
  8. help Get help on a command
  9. images List images
  10. kill Kill containers
  11. logs View output from containers
  12. pause Pause services
  13. port Print the public port for a port binding
  14. ps List containers
  15. pull Pull service images
  16. push Push service images
  17. restart Restart services
  18. rm Remove stopped containers
  19. run Run a one-off command
  20. scale Set number of containers for a service
  21. start Start services
  22. stop Stop services
  23. top Display the running processes
  24. unpause Unpause services
  25. up Create and start containers
  26. version Show the Docker-Compose version information