gpt4 book ai didi

docker - 如何在 docker compose 中设置覆盖网络

转载 作者:行者123 更新时间:2023-12-02 18:31:45 31 4
gpt4 key购买 nike

如果我尝试使用覆盖网络调出一个 docker compose 文件,我会收到以下错误:

Creating network "esswarm_scarfelastic" with driver "overlay" ERROR: driver name: if driver is specified name is required

使用此 docker-compose.yaml 生成:

networks:
scarfelastic:
driver: overlay

这可能是一个错误,因为如果我将“网桥”指定为网络驱动程序,则不需要“指定名称”。

最佳答案

请注意,您需要最新的 docker-compose 1.9.0,它有一个 release note including :

Fixed an issue where Compose would incorrectly detect a configuration mismatch for overlay network

参见 issue 3845PR 4098 .
Issue 3575显示可能的工作语法。

关于docker - 如何在 docker compose 中设置覆盖网络,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41627266/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com