gpt4 book ai didi

docker - 具有撰写文件的docker swarm无法识别 “links”

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

docker-compose.yml

version: '3.3'

services:

hello:
image: dockercloud/hello-world

service_auth:
image: beevelop/nginx-basic-auth
ports:
- 8080:80
links:
- hello:web
environment:
HTPASSWD: 'foo:$apr1$odHl5EJN$KbxMfo86Qdve2FH4owePn.'

docker -版本
Docker version 17.09.0-ce, build afdb6d4

docker stack deploy -c docker-compose.yml auth
Ignoring unsupported options: links

为什么不支持链接?

最佳答案

official documentation确实列出了compose和stack不支持的内容,其中包括 links

Links are not required to enable services to communicate - by default, any service can reach any other service at that service’s name. (See also, the Links topic in Networking in Compose.)



因此,该选项是带有(版本3)撰写文件的 ignored when deploying a stack in swarm mode
$ docker stack deploy --compose-file docker-compose.yml vossibility

Ignoring unsupported options: links

关于docker - 具有撰写文件的docker swarm无法识别 “links”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47627000/

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