For testing our escrow build, I'm attempting to set up a docker network that's isolated from the host and from the outside world.
I've got the following docker-compose.yml
(inspired by this forum post):
version: '3'
services:
redis:
image: "redis:2.8.23"
networks:
- isolated
# ... more services (TODO)
networks:
isolated:
driver: overlay
internal: true
When I run docker-compose up -d
; it creates the network, but then fails to create the containers, reporting the following:
ERROR: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
But I'm not using docker swarm, nor do I want to.
If I remove the services:
stanza from the file, it brings up the network without the error. It warns that the network is unused (obviously).
If I remove the services/redis/networks
stanza, it brings up the container correctly.
What am I doing wrong?
I found this answer, which uses driver: bridge
for the network, but that still allows access to the host.
- Docker version 18.09.3, build 774a1f4
- docker-compose version 1.21.2, build a133471