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 has the following network:
$ docker network ls
NETWORK ID NAME DRIVER SCOPE
...
b7dptlu8zyqa vme_internal overlay swarm
...
defined in the docker-compose.yml
file as:
networks:
internal:
The command I run is
docker run --rm --network vme_internal app:0.1 db upgrade
with the extra vme_
prefix coming from the name that I gave the stack when deploying. Now when I run the above command, I get:
docker: Error response from daemon: Could not attach to network vme_internal:
rpc error: code = 7 desc = network vme_internal not manually attachable.
How do I make the network attachable?
I couldn't find any specific info about attachable in Docker networking and tried adding an attribute attachable
to the network definition without success.