Description
I'm starting to learn Docker Swarm and I got to this great example. I think it's designed to work out of the box, but it does not seem like it, so I'm making an issue in case somebody has the same problem.
General description of the problem: Does not work with Docker Swarm out of the box.
You initialize the swarm (Docker playground). Only one node from simplicity.
You execute the indicated command docker stack deploy -c docker-stack.yml vote
And the web services do not load in the page.
Steps to reproduce the issue:
- You initialize the swarm (Docker playground). Only one node from simplicity.
- You execute the indicated command
docker stack deploy -c docker-stack.yml vote
- And the web services do not load in the page.
I tried to see if it was the environment (Docker Pground), so I pulled a test image
docker pull kennethreitz/httpbin
docker run -p 8080:80 kennethreitz/httpbin
The above DOES work. Which means the environment by itself can open ports/show web services.
Describe the results you received:
The web services do not load in the page.
Describe the results you expected:
And the web services do load in the page.
Output of docker version
:
Client:
Version: 27.3.1
API version: 1.47
Go version: go1.22.7
Git commit: ce12230
Built: Fri Sep 20 11:39:44 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 27.3.1
API version: 1.47 (minimum version 1.24)
Go version: go1.22.7
Git commit: 41ca978
Built: Fri Sep 20 11:41:02 2024
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: v1.7.22
GitCommit: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
runc:
Version: 1.1.14
GitCommit: v1.1.14-0-g2c9f560
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Output of docker info
:
$ docker info
Client:
Version: 27.3.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.17.1
Path: /usr/local/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.29.7
Path: /usr/local/libexec/docker/cli-plugins/docker-compose
scout: Docker Scout (Docker Inc.)
Version: v1.0.9
Path: /usr/lib/docker/cli-plugins/docker-scout
Server:
Containers: 8
Running: 7
Paused: 0
Stopped: 1
Images: 6
Server Version: 27.3.1
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: active
NodeID: nq97nidjyq5yivrqh3who2bp2
Is Manager: true
ClusterID: mh6pqpiwlbsy7cwp1q20r8hqn
Managers: 1
Nodes: 3
Data Path Port: 4789
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 192.168.0.12
Manager Addresses:
192.168.0.12:2377
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
runc version: v1.1.14-0-g2c9f560
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
Kernel Version: 4.4.0-210-generic
Operating System: Alpine Linux v3.20 (containerized)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 31.42GiB
Name: node1
ID: 0d947af3-49dd-4127-901d-6ae13791da8d
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 106
Goroutines: 261
System Time: 2024-11-25T04:45:38.29298998Z
EventsListeners: 7
Experimental: true
Insecure Registries:
127.0.0.1
127.0.0.0/8
Registry Mirrors:
https://mirror.gcr.io/
Live Restore Enabled: false
Product License: Community Engine
[DEPRECATION NOTICE]: API is accessible on http://0.0.0.0:2375 without encryption.
Access to the remote API is equivalent to root access on the host. Refer
to the 'Docker daemon attack surface' section in the documentation for
more information: https://docs.docker.com/go/attack-surface/
In future versions this will be a hard failure preventing the daemon from starting! Learn more at: https://docs.docker.com/go/api-security/
WARNING: No swap limit support
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Additional environment details:
Docker Playground -> regular instance.
$ cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.20.3
PRETTY_NAME="Alpine Linux v3.20"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"