使用docker-compose时出错

时间:2017-01-17 20:07:50

标签: docker-compose

我在docker website上找到docker-compose down这样的命令,但是当我尝试使用它时,我收到错误。

No such command: down

Commands:
  build              Build or rebuild services
  help               Get help on a command
  kill               Kill containers
  logs               View output from containers
  port               Print the public port for a port binding
  ps                 List containers
  pull               Pulls service images
  restart            Restart services
  rm                 Remove stopped containers
  run                Run a one-off command
  scale              Set number of containers for a service
  start              Start services
  stop               Stop services
  up                 Create and start containers
  migrate-to-labels  Recreate containers to add labels

我的docker-compose版本是:

docker-compose version: 1.3.1
CPython version: 2.7.10
OpenSSL version: OpenSSL 1.0.2d 9 Jul 2015

我做错了吗?

1 个答案:

答案 0 :(得分:1)

可能是docker-compose down命令在您使用的版本中不可用 - 该命令已在版本1.6.0中添加 - 请参阅CHANGELOG here。 因此,如果您确实要使用该命令,则可能必须升级到版本1.6.0或更高版本。

希望这有帮助。