Step 5 fails to attach to the container. Attaching to alpine1 on host1 works and so does a ping to alpine2 from alpine1 (and vice-versa). But I cannot attach to alpine2 from host1 or alpine1 from host2.
The network gets created on host2. However, a network inspect test-net on each host only shows the container running on that host (ie. host1 only shows alpine1 and host2 only shows alpine2).
I first experienced this issue when trying to setup container communication across two docker hosts using overlay networking. Figured there must be something wrong with my environment, so I setup the simplest example I could with two virtual machines and following only the instructions on the tutorial from the documentation and the issue persists.
Output of docker version:
Client:
Version: 18.03.0-ce
API version: 1.37
Go version: go1.9.4
Git commit: 0520e24
Built: Wed Mar 21 23:10:01 2018
OS/Arch: linux/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.0-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.4
Git commit: 0520e24
Built: Wed Mar 21 23:08:31 2018
OS/Arch: linux/amd64
Experimental: false
Expected behavior
Should be able to attach to container alpine2 running on host2 from host1 e.g:
(host1) $ docker container attach alpine2
Actual behavior
Error: No such container alpine2
Steps to reproduce the behavior
Following instructions on https://docs.docker.com/network/network-tutorial-overlay/#use-an-overlay-network-for-standalone-containers using two freshly spun up VMs running ubuntu server 16.04 and docker 18.03.0-ce.
Step 5 fails to attach to the container. Attaching to alpine1 on host1 works and so does a ping to alpine2 from alpine1 (and vice-versa). But I cannot attach to alpine2 from host1 or alpine1 from host2.
The network gets created on host2. However, a
network inspect test-net
on each host only shows the container running on that host (ie. host1 only shows alpine1 and host2 only shows alpine2).I first experienced this issue when trying to setup container communication across two docker hosts using overlay networking. Figured there must be something wrong with my environment, so I setup the simplest example I could with two virtual machines and following only the instructions on the tutorial from the documentation and the issue persists.
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.) VirtualBox