1

我开始将 Docker 与 Laradock 一起使用。当我运行此命令时

docker-compose up -d apache2 mysql

我收到此错误:

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.proxy.expose is invalid: should be of the format 'PORT[/PROTOCOL]'
services.proxy2.expose is invalid: should be of the format 'PORT[/PROTOCOL]'
services.memcached.ports is invalid: Port ranges don't match in length
services.beanstalkd.ports is invalid: Port ranges don't match in length
services.mssql.ports is invalid: Port ranges don't match in length
services.rabbitmq.ports is invalid: Port ranges don't match in length
services.rabbitmq.ports is invalid: Port ranges don't match in length
services.netdata.ports is invalid: Port ranges don't match in length
services.beanstalkd-console.ports is invalid: Port ranges don't match in length
services.zookeeper.ports is invalid: Port ranges don't match in length
services.gitlab.ports is invalid: Port ranges don't match in length
services.workspace.ports is invalid: Port ranges don't match in length
services.maildev.ports is invalid: Port ranges don't match in length
services.mongo.ports is invalid: Port ranges don't match in length

我正在使用 Mac 并且已经重新启动 docker。我需要修复什么?

4

1 回答 1

11

只是为使用 laradock 收到此错误的人提供信息,这是因为 .env 文件丢失,请在您的 docker (laradock) 文件夹中创建一个包含此内容的 .env 文件:

https://raw.githubusercontent.com/laradock/laradock/master/env-example

于 2019-04-07T15:22:42.103 回答