Docker Community Forums

Share and learn in the Docker community.

Mounting volumes on windows server 2019 (invalid mount target, must be an absolute path: /app)

I’m trying to use a mount when creating a service with Linux containers on Windows Server 2019 and running into an issue (invalid mount target, must be an absolute path: /app). This mount seems to work fine if using docker run.

Actual behavior

The following appears to work:

docker run -d --name devtest --mount source=tcilogs,target=/app nginx:latest

However, the following fails with the following error: (invalid mount target, must be an absolute path: /app)

docker service create --name a --no-resolve-image --mount source=tcilogs,target=/app nginx:latest

The volume is very simple, created via docker volume create:
PS C:\swarm_deploy> docker volume inspect tcilogs
“CreatedAt”: “2019-09-12T16:39:38+01:00”,
“Driver”: “local”,
“Labels”: {},
“Mountpoint”: “C:\ProgramData\docker\volumes\tcilogs\_data”,
“Name”: “tcilogs”,
“Options”: {},
“Scope”: “local”

Output of docker info:

PS C:\swarm_deploy> docker info
Debug Mode: false
cluster: Manage Docker clusters (Docker Inc., v1.1.0-8c33de7)

Containers: 8
Running: 1
Paused: 0
Stopped: 7
Images: 9
Server Version: 19.03.2
Storage Driver: windowsfilter (windows) lcow (linux)
Logging Driver: json-file
Volume: local
Network: ics l2bridge l2tunnel nat null overlay transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: active
NodeID: zu7x0rzmp49vp9zmmvm7hdw2n
Is Manager: true
ClusterID: mv0nyhkiuseisy34q0fg9bqcz
Managers: 1
Nodes: 1
Default Address Pool:
SubnetSize: 24
Data Path Port: 4789
Task History Retention Limit: 5
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address:
Manager Addresses:
Default Isolation: process
Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
Operating System: Windows Server 2019 Standard Version 1809 (OS Build 17763.720)
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 24GiB
Name: dc-uat-tci-01
Docker Root Dir: C:\ProgramData\docker
Debug Mode: false
Username: mhollandertetragoninvcom
Experimental: true
Insecure Registries:
Live Restore Enabled: false