Skip to content
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

Closed
Nitrogenycs opened this issue Nov 7, 2017 · 8 comments
Closed

LCOW: Linux Containers On Windows: volume mounting issues #35425

Nitrogenycs opened this issue Nov 7, 2017 · 8 comments
Labels
area/lcow Issues and PR's related to the experimental LCOW feature kind/experimental platform/windows

Comments

@Nitrogenycs
Copy link

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

  • Diagnostic IDs AD1E45FA-8E1A-467E-BE81-6720D87B4EB8/2017-11-05_16-26-17 and AD1E45FA-8E1A-467E-BE81-6720D87B4EB8/2017-11-05_17-07-00.
  • Issues appear with latest edge version (17.11), the 17.09 (13620) stable build seems ok

Steps to reproduce the behavior

  1. Basically mounting in non-LCOW mode is broken now. After running something like 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 empty ls output whereas it should show some files. This is what I get in from the docker log file:
[17:12:50.316][ApiProxy       ][Info   ] time="2017-11-05T17:12:50+01:00" msg="proxy >> POST /v1.34/containers/create [rewriteBinds]\n"
[17:12:50.317][ApiProxy       ][Info   ] time="2017-11-05T17:12:50+01:00" msg="Rewrote mount /c/coding/kubectl:/app (volumeDriver=) to /host_mnt/c/coding/kubectl:/app\n"
[17:12:50.328][ApiProxy       ][Info   ] time="2017-11-05T17:12:50+01:00" msg="Failed to read proxies/http from snaphshot p9p.MessageRerror{Ename:\"No such file or directory\"}"
  1. In non-LCOW I was able to do docker run -v /var/run/docker.sock:/var/run/docker.sock .... This gives docker: 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?

  2. In non-LCOW I was able to do -v /C/tmp:/blabla. This gives the same error as 2). Changing this to C:\tmp:/blabla seems to fix this.

  3. 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.

@thaJeztah
Copy link
Member

ping @jhowardmsft @johnstep PTAL

@darthtrevino
Copy link

I'm trying to use LCOW and docker-compose, and I'm running into that same "Invalid Volume Specification" issue.

ERROR: for mongo-seed  Cannot create container for service mongo-seed: invalid volume specification: '/c/Workspace/spruce-moose/config/seed:/seed-data:ro'

docker-compose.yml

version: '3.4'

services:
  mongodb:
    image: mongo:3.5
    ports:
      - "27017:27017"

  mongo-seed:
    image: mongo:3.5
    links:
      - mongodb
    volumes:
      - type: volume
        source: c:\Workspace\spruce-moose\config\seed
        target: /seed-data
        read_only: true
    command: bash -c "/seed-data/import.sh"

@khs1994
Copy link

khs1994 commented Nov 26, 2017

@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"

@darthtrevino
Copy link

@khs1994 I tried to use the bind mount type, and I got the some error

@awidjaja
Copy link

awidjaja commented Jan 2, 2018

@jstarks
cc: @friism

docker run -v /var/run/docker.sock:/var/run/docker.sock docker docker ps

doesn't work on the latest version of docker for windows using LCOW.

@morbloe
Copy link

morbloe commented Jun 2, 2018

Any news on this?

underscorgan pushed a commit to underscorgan/puppetserver that referenced this issue Oct 25, 2018
underscorgan pushed a commit to underscorgan/puppetserver that referenced this issue Oct 26, 2018
underscorgan pushed a commit to underscorgan/puppetserver that referenced this issue Oct 26, 2018
@thaJeztah thaJeztah added the area/lcow Issues and PR's related to the experimental LCOW feature label Oct 30, 2018
underscorgan pushed a commit to underscorgan/puppetserver that referenced this issue Nov 6, 2018
@hulucc
Copy link

hulucc commented Feb 15, 2019

@darthtrevino set COMPOSE_CONVERT_WINDOWS_PATHS=false

@thaJeztah thaJeztah changed the title Linux Containers On Windows: volume mounting issues LCOW: Linux Containers On Windows: volume mounting issues Oct 24, 2019
@thaJeztah
Copy link
Member

Closing this issue, because the experimental LCOW feature has been deprecated and removed in Docker 23.0 and up;

@thaJeztah thaJeztah closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/lcow Issues and PR's related to the experimental LCOW feature kind/experimental platform/windows
Projects
None yet
Development

No branches or pull requests

7 participants