can not use user-defined bridge in swarm compose yaml file
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I learned from docker documentation that I can not use docker DNS to find containers using their hostnames without utilizing user-defined bridge network. I created one using the command: docker network create --driver=overlay --subnet=172.22.0.0/16 --gateway=172.22.0.1 user_defined_overlay and tried to deploy a container that uses it. compose file looks like: version: "3.0" services: web1: image: "test" ports: - "12023:22" hostname: "mytest-web1" networks: - test web2: image: "test" ports: - "12024:22" hostname: "mytest-web2" networks: -