背景说明

# docker-compose scale user=2 order=2

解决方案

帮助命令

  1. [root@vm1 ~]# 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
  6. Options:
  7. -f, --file FILE Specify an alternate compose file (default: docker-compose.yml)
  8. -p, --project-name NAME Specify an alternate project name (default: directory name)
  9. --verbose Show more output
  10. --no-ansi Do not print ANSI control characters
  11. -v, --version Print version and exit
  12. -H, --host HOST Daemon socket to connect to
  13. --tls Use TLS; implied by --tlsverify
  14. --tlscacert CA_PATH Trust certs signed only by this CA
  15. --tlscert CLIENT_CERT_PATH Path to TLS certificate file
  16. --tlskey TLS_KEY_PATH Path to TLS key file
  17. --tlsverify Use TLS and verify the remote
  18. --skip-hostname-check Don't check the daemon's hostname against the name specified
  19. in the client certificate (for example if your docker host
  20. is an IP address)
  21. --project-directory PATH Specify an alternate working directory
  22. (default: the path of the Compose file)
  23. Commands:
  24. build Build or rebuild services
  25. bundle Generate a Docker bundle from the Compose file
  26. config Validate and view the Compose file
  27. create Create services
  28. down Stop and remove containers, networks, images, and volumes
  29. events Receive real time events from containers
  30. exec Execute a command in a running container
  31. help Get help on a command
  32. images List images
  33. kill Kill containers
  34. logs View output from containers
  35. pause Pause services
  36. port Print the public port for a port binding
  37. ps List containers
  38. pull Pull service images
  39. push Push service images
  40. restart Restart services
  41. rm Remove stopped containers
  42. run Run a one-off command
  43. scale Set number of containers for a service
  44. start Start services
  45. stop Stop services
  46. top Display the running processes
  47. unpause Unpause services
  48. up Create and start containers
  49. version Show the Docker-Compose version information
  50. [root@vm1 ~]#

版本查看

  1. [root@vm1 ~]# docker-compose version
  2. docker-compose version 1.18.0, build 8dd22a9
  3. docker-py version: 2.6.1
  4. CPython version: 3.6.8
  5. OpenSSL version: OpenSSL 1.0.2k-fips 26 Jan 2017
  6. [root@vm1 ~]#