-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LCOW: Linux Containers On Windows: volume mounting issues #35425
Comments
ping @jhowardmsft @johnstep PTAL |
I'm trying to use LCOW and docker-compose, and I'm running into that same "Invalid Volume Specification" issue.
docker-compose.yml
|
@darthtrevino your type is error mongo-seed:
image: mongo:3.5
links:
- mongodb
volumes:
# - type: volume
- type: bind
source: c:\Workspace\spruce-moose\config\seed
target: /seed-data
read_only: true
command: bash -c "/seed-data/import.sh" |
@khs1994 I tried to use the bind mount type, and I got the some error |
Any news on this? |
@darthtrevino |
Closing this issue, because the experimental LCOW feature has been deprecated and removed in Docker 23.0 and up; |
This is basically a copy of docker/for-win#1284 where people told me that moby/moby is a more appropriate place to raise this issue.
Expected behavior
I can mount volumes with -v in LCOW mode just like I can do in the older VM mode. If this is not possible there should be some kind of documentation explaining how this works different from before.
Actual behavior
There seem to be many differences in mount handling in LCOW mode compared to non-LCOW mode.
Information
AD1E45FA-8E1A-467E-BE81-6720D87B4EB8/2017-11-05_16-26-17
andAD1E45FA-8E1A-467E-BE81-6720D87B4EB8/2017-11-05_17-07-00
.Steps to reproduce the behavior
docker run --rm -v /c/coding/kubectl:/app -it ubuntu:16.04 ls -l /app
where c:\coding\kubectl is a non-empty directory I get an emptyls
output whereas it should show some files. This is what I get in from the docker log file:In non-LCOW I was able to do
docker run -v /var/run/docker.sock:/var/run/docker.sock ...
. This givesdocker: Error response from daemon: invalid volume specification: '/var/run/docker.sock:/var/run/docker.sock'
with LCOW. I have no idea where I can find/var/run/docker.sock
now. Do I have to resort to tcp:// instead to be able to access the docker daemon from within a container?In non-LCOW I was able to do
-v /C/tmp:/blabla
. This gives the same error as 2). Changing this toC:\tmp:/blabla
seems to fix this.I was able to mount a file in non-LCOW mode, e.g.
-v c:\tmp\somefile:/tmp/somefile
. This does not work anymore and produces this error:docker: Error response from daemon: invalid volume specification: 'c:\tmp\somefile:/tmp/somefile': invalid mount config for type "bind": source path must be a directory.
. When I mount a directory instead of a file, things work again.The text was updated successfully, but these errors were encountered: