Description
Steps to reproduce the issue:
- create a basic service website service image with /app as the IIS app folder
2.try to run image mounting a volume mapping docker run -d -v C:\directory\filename:/containerdir/filename imagename
PROBLEM SUMMARY
Does Docker Windows support a FILE volume mapping?
Example
docker run -d -v C:\directory\filename:/containerdir/filename imagename
I am able to get this working on a folder level.
docker run -v c:/configs:c:/app/config -d -p 9090:80 qaaauthservice
51bfc482d2acf6caf20356d4eec01c6f866a4f01ef8684793920c0e6c066ddf0
but on a file level it fails
docker run -v c:/configs/appsettings.QAA.json:c:/app/appsettings.json -d -p 9090:80 qaaauthservice
docker: Error response from daemon: invalid volume specification: 'c:/configs/appsettings.QAA.json:c:/app/appsettings.json': invalid mount config for type "bind": source path must be a directory.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
C:\>docker version
Client: Docker Engine - Community
Version: 19.03.1
API version: 1.40
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:17:08 2019
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.1
API version: 1.40 (minimum version 1.24)
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:25:07 2019
OS/Arch: windows/amd64
Experimental: false
Output of docker info:
Client:
Debug Mode: false
Server:
Containers: 31
Running: 0
Paused: 0
Stopped: 31
Images: 13
Server Version: 19.03.1
Storage Driver: windowsfilter
Windows:
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: inactive
Default Isolation: hyperv
Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
Operating System: Windows 10 Enterprise Version 1809 (OS Build 17763.593)
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 15.89GiB
Name: LanLyo-17017w10
ID: VNTU:OHWX:NQA6:PIJR:R2UX:C7AF:LIIH:SRM7:Y73X:UUUN:JMYO:KAT5
Docker Root Dir: C:\ProgramData\Docker
Debug Mode: true
File Descriptors: -1
Goroutines: 28
System Time: 2019-08-20T17:58:42.1140274-05:00
EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Additional environment details (AWS, VirtualBox, physical, etc.):
Running on Physical laptop with WIndows 10
Description
Steps to reproduce the issue:
2.try to run image mounting a volume mapping docker run -d -v C:\directory\filename:/containerdir/filename imagename
PROBLEM SUMMARY
Does Docker Windows support a FILE volume mapping?
Example
docker run -d -v C:\directory\filename:/containerdir/filename imagename
I am able to get this working on a folder level.
docker run -v c:/configs:c:/app/config -d -p 9090:80 qaaauthservice
51bfc482d2acf6caf20356d4eec01c6f866a4f01ef8684793920c0e6c066ddf0
but on a file level it fails
docker run -v c:/configs/appsettings.QAA.json:c:/app/appsettings.json -d -p 9090:80 qaaauthservice
docker: Error response from daemon: invalid volume specification: 'c:/configs/appsettings.QAA.json:c:/app/appsettings.json': invalid mount config for type "bind": source path must be a directory.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version:Output of
docker info:Additional environment details (AWS, VirtualBox, physical, etc.):
Running on Physical laptop with WIndows 10