Docker stack deploy fails on Docker for Windows when redeploying
Description
I'm using relative path in YML file, the first deploy works but if I re-run the deploy command, there is error about bindings.
Describe the results you received:
workspace master *% = $ docker stack deploy workspace --compose-file docker-compose.yml
Creating network workspace_network
Creating service workspace_traefik
Creating service workspace_portainer
Creating service workspace_dns
workspace master *% = $ docker service ps workspace_portainer --no-trunc
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
pshqd8it2marsj375dpcbs8lf workspace_portainer.1 portainer/portainer:latest@sha256:261d02375566fd24f3fc0fb358bb5e4c394d82b3e44efb77e1609dd01c3d4369 linuxkit-00155d0113b2 Running Running 14 seconds ago
workspace master *% = $ docker stack deploy workspace --compose-file docker-compose.yml
Updating service workspace_portainer (id: uvgjobyi0bz5vnrkb8qu96ek8)
Updating service workspace_dns (id: ul1g12pcgli155xcwwykkftp4)
Updating service workspace_traefik (id: qysw7mce8kyppdaplab3pt16a)
workspace master *% = $ docker service ps workspace_portainer --no-trunc
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
royimf2e34m2bczsuacmzm0bq \_ workspace_portainer.1 portainer/portainer:latest@sha256:261d02375566fd24f3fc0fb358bb5e4c394d82b3e44efb77e1609dd01c3d4369 linuxkit-00155d0113b2 Shutdown Rejected 7 seconds ago "invalid bind mount source, must be an absolute path: C:\Users\user\workspace\workspace\portainer"
pshqd8it2marsj375dpcbs8lf \_ workspace_portainer.1 portainer/portainer:latest@sha256:261d02375566fd24f3fc0fb358bb5e4c394d82b3e44efb77e1609dd01c3d4369 linuxkit-00155d0113b2 Shutdown Shutdown 3 seconds ago
1st deploy : the path is translated to Linux equivalent
"Mounts": [
{
"Type": "bind",
"Source": "/var/run/docker.sock",
"Target": "/var/run/docker.sock"
},
{
"Type": "bind",
"Source": "/host_mnt/c/Users/itsca/workspace/workspace/portainer",
"Target": "/data"
}
],
2nd deploy: the path is not translated to Linux equivalent
"Mounts": [
{
"Type": "bind",
"Source": "/var/run/docker.sock",
"Target": "/var/run/docker.sock"
},
{
"Type": "bind",
"Source": "C:\\Users\\user\\workspace\\workspace\\portainer",
"Target": "/data"
}
],
Describe the results you expected:
The service should continue to work.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:05:22 2017
OS/Arch: windows/amd64
Server:
Engine:
Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:12:29 2017
OS/Arch: linux/amd64
Experimental: true
Output of docker info:
Containers: 73
Running: 10
Paused: 0
Stopped: 63
Images: 540
Server Version: 17.12.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: active
NodeID: mlxv4tngs919snf1m4e9eisot
Is Manager: true
ClusterID: 75wz6iktsi3419gd5g5mbidwx
Managers: 1
Nodes: 1
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 3
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.65.2
Manager Addresses:
192.168.65.2:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.60-linuxkit-aufs
Operating System: Docker for Windows
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.837GiB
Name: linuxkit-00155d0113b2
ID: 4CBV:ZYXE:RATR:L4DJ:52TE:BDGS:MJVW:KLPJ:BBII:6D25:A54G:ONXP
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 134
Goroutines: 341
System Time: 2018-01-10T10:26:34.2539635Z
EventsListeners: 12
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
registry.access.redhat.com
127.0.0.0/8
Live Restore Enabled: false
Additional environment details (AWS, VirtualBox, physical, etc.): Docker for Windows
https://github.com/moby/moby/issues/35974
Also reported in https://github.com/docker/for-win/issues/1341 and https://github.com/moby/moby/issues/34997
Any updates? Having the same problem on Windows 10.
Version 18.03.1-ce-win65 (17513) Channel: stable 93354b3
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
Same problem here.
The problem persist with docker engine 18.09 / docker 2.0.0.0 - any plans to have this fixed?
I can confirm that I experience the same problem!
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
similar issue here +1
I have the same issue. Any plans to fix?
Same issue here... this is not good :( --- Even the suggested workarounds using /host_mnt/c/... didn't work for me. Is the workaround here to deploy to a windows manager in the swarm cluster?
I have the same issue.
There is a possibility to avoid the problem. Not the perfect, but better than nothing. So, if I have to redeploy the stack, I just remove every service with mounts, than redeploy the stack.
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked