Laradock端口范围长度不匹配错误

时间:2019-03-20 08:45:18

标签: laravel docker laradock

我开始将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。我需要解决什么?

1 个答案:

答案 0 :(得分:2)

仅针对那些使用laradock遇到此错误的人提供信息,这是因为缺少.env文件,请在docker(laradock)文件夹中创建一个包含以下内容的.env文件:

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