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: many volume mounting issues #1284

Closed
Nitrogenycs opened this issue Nov 5, 2017 · 5 comments
Closed

LCOW: many volume mounting issues #1284

Nitrogenycs opened this issue Nov 5, 2017 · 5 comments

Comments

@Nitrogenycs
Copy link

Nitrogenycs commented Nov 5, 2017

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.

@syedhassaanahmed
Copy link

syedhassaanahmed commented Nov 5, 2017

+1 Seems like a regression in latest version.

Single File Mount: docker run -it --rm -v ${pwd}/file.txt:/file.txt test-image cat file.txt

Folder Mount: docker run -it --rm -v ${pwd}:/project test-image cat project/file.txt

Both calls yield cat: read error: Is a directory

@ebriney
Copy link
Member

ebriney commented Nov 7, 2017

Thanks. Can you please report it in moby/moby, this is more an lcow engine issue.

@los93sol
Copy link

los93sol commented Feb 6, 2018

Any update?

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants