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

后端 未结 2 928
感情败类
感情败类 2021-02-12 09:24

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:03

    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.

提交回复
热议问题