Laradock:docker-compose.yml 是 Windows 上的无效格式 (PORT[/PROTOCOL])
Laradock: docker-compose.yml is invalid format (PORT[/PROTOCOL]) on Windows
我尝试按照 windows 上的 Laradock 入门教程进行操作:http://laradock.io/getting-started/
我有以下工具:
Docker version: 20.10.5, build 55c4c88
git version: 2.30.2.windows.1
Windows 10 20H2(19042.867)
我在尝试启动时卡在了台阶上:docker-compose up -d nginx 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.proxy.ports contains an invalid type, it should be a number, or an object
services.proxy2.ports contains an invalid type, it should be a number, or an object
...
services.sqs.ports contains an invalid type, it should be a number, or an object
services.sqs.ports contains an invalid type, it should be a number, or an object
services.traefik.ports value [':', ':', ':'] has non-unique elements
我对 repo 所做的唯一更改是添加 env 文件和这一行:
# Point to the path of your applications code on your host
APP_CODE_PATH_HOST=../project-z/
我还创建了文件夹project-z
我看到了这段文字引用但没看懂:
Depending on the host’s operating system you may need to change the
value given to COMPOSE_FILE. When you are running Laradock on Mac OS
the correct file separator to use is :. When running Laradock from a
Windows environment multiple files must be separated with ;.
但我认为这可能与我的问题有关,我需要更新一些内容以使其在 Windows 上运行。
知道哪里出了问题吗?因为它几乎是开箱即用的,所以我认为它与我的 Windows 环境有关
发完这个问题我直接找到了解决办法
我很容易忘记添加“。”在创建文件时在 env 之前。
我在这里找到了解决方案:https://github.com/laradock/laradock/issues/1437
我尝试按照 windows 上的 Laradock 入门教程进行操作:http://laradock.io/getting-started/
我有以下工具:
Docker version: 20.10.5, build 55c4c88
git version: 2.30.2.windows.1
Windows 10 20H2(19042.867)
我在尝试启动时卡在了台阶上:docker-compose up -d nginx 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.proxy.ports contains an invalid type, it should be a number, or an object
services.proxy2.ports contains an invalid type, it should be a number, or an object
...
services.sqs.ports contains an invalid type, it should be a number, or an object
services.sqs.ports contains an invalid type, it should be a number, or an object
services.traefik.ports value [':', ':', ':'] has non-unique elements
我对 repo 所做的唯一更改是添加 env 文件和这一行:
# Point to the path of your applications code on your host
APP_CODE_PATH_HOST=../project-z/
我还创建了文件夹project-z
我看到了这段文字引用但没看懂:
Depending on the host’s operating system you may need to change the value given to COMPOSE_FILE. When you are running Laradock on Mac OS the correct file separator to use is :. When running Laradock from a Windows environment multiple files must be separated with ;.
但我认为这可能与我的问题有关,我需要更新一些内容以使其在 Windows 上运行。
知道哪里出了问题吗?因为它几乎是开箱即用的,所以我认为它与我的 Windows 环境有关
发完这个问题我直接找到了解决办法
我很容易忘记添加“。”在创建文件时在 env 之前。
我在这里找到了解决方案:https://github.com/laradock/laradock/issues/1437