“network not manually attachable” when running one-off command against docker swarm network

后端 未结 2 1826
误落风尘
误落风尘 2021-02-12 09:32

I\'m trying to run a one-off command to initialise a database schema in a new docker swarm which is deployed with 1.13\'s new support for docker-compose files.

The swarm

2条回答
  •  醉酒成梦
    2021-02-12 10:00

    By default, overlay networks created with the new swarm mode cannot be used with containers not run from swarm. Version 1.13 allows you to toggle this setting, so make sure you've upgraded. You must create the network with the attachable flag. I also couldn't get this to work on a swarm worker, the node needed to be promoted to a swarm manager.

提交回复
热议问题