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
Client:
Debug Mode: false
Plugins:
cluster: Manage Docker clusters (Docker Inc., v1.1.0-8c33de7)

Server:
Containers: 8
Running: 1
Paused: 0
Stopped: 7
Images: 9
Server Version: 19.03.2
Storage Driver: windowsfilter (windows) lcow (linux)
Windows:
LCOW:
Logging Driver: json-file
Plugins:
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: 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: 10.100.3.32
Manager Addresses:
10.100.3.32:2377
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
ID: MHU6:SM24:CQLV:ESVI:3DSH:DFVA:FQL4:WDO2:5YKZ:XSPK:4X26:YRGW
Docker Root Dir: C:\ProgramData\docker
Debug Mode: false
Username: mhollandertetragoninvcom
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false