-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Labels
Description
Docker on Windows Server 2022 crashes when trying to start connected to overlay network container with published ports (host mode).
For the same reason can't deploy any stack with published ports because docker always creates new overlay network for stack.
Steps to reproduce the issue:
- Install Windows Server 2022 and all updates, set static IP (192.168.77.104)
- Install Docker, I mean Mirantis Container Runtime (ex. Docker Enterprise Engine)
- docker swarm init --advertise-addr 192.168.77.104 --listen-addr 192.168.77.104
- docker run -d --name test1 -p 80:80 mcr.microsoft.com/dotnet/samples:aspnetapp
IT WORKS! - docker rm test1 -f
- docker network create --driver overlay --attachable test-network
- docker run -d --name test2 --publish published=80,target=80,mode=host --network test-network mcr.microsoft.com/dotnet/samples:aspnetapp
GET AN ERROR: docker: Error response from daemon: failed to create endpoint test2 on network test-network: Bind for 0.0.0.0:80 failed: port is already allocated. - docker rm test2
- Trying use even different ports for host and container:
docker run -d --name test3 --publish published=8080,target=80,mode=host --network test-network mcr.microsoft.com/dotnet/samples:aspnetapp
GET AN ERROR: docker: Error response from daemon: failed to create endpoint test3 on network test-network: Bind for 0.0.0.0:8080 failed: port is already allocated.
Describe the results you received:
Can't use port publishing with host mode + overlay network.
Describe the results you expected:
Port publishing with host mode and overlay network should work
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client: Mirantis Container Runtime
Version: 20.10.6
API version: 1.41
Go version: go1.13.15
Git commit: b3766ff
Built: 06/29/2021 17:14:16
OS/Arch: windows/amd64
Context: default
Experimental: true
Server: Mirantis Container Runtime
Engine:
Version: 20.10.6
API version: 1.41 (minimum version 1.24)
Go version: go1.13.15
Git commit: a3dc69e6b9
Built: 06/29/2021 17:12:49
OS/Arch: windows/amd64
Experimental: false
Output of docker info:
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker Application (Docker Inc., v0.8.0)
cluster: Manage Mirantis Container Cloud clusters (Mirantis Inc., v1.9.0)
registry: Manage Docker registries (Docker Inc., 0.1.0)
Server:
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 22
Server Version: 20.10.6
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: active
NodeID: aizatb4rxdp4p24hhojs7mtny
Is Manager: true
ClusterID: ycgq3kqc15lxqfgkpaarqgudj
Managers: 1
Nodes: 1
Default Address Pool: 10.0.0.0/8
SubnetSize: 24
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.77.104
Manager Addresses:
192.168.77.104:2377
Default Isolation: process
Kernel Version: 10.0 20348 (20348.1.amd64fre.fe_release.210507-1500)
Operating System: Windows Server 2022 Standard Evaluation Version 2009 (OS Build 20348.202)
OSType: windows
Architecture: x86_64
CPUs: 28
Total Memory: 32GiB
Name: SRV-WDA1
ID: HUZK:R3D3:QTHU:O5F3:VTWK:LTHO:QGB5:5FS7:BYE5:HBYJ:ODPV:J5TL
Docker Root Dir: C:\ProgramData\docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Reactions are currently unavailable