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

"." shorthand directory mounted volumes are empty in Container #1080

Closed
f3ndot opened this issue Sep 9, 2017 · 6 comments
Closed

"." shorthand directory mounted volumes are empty in Container #1080

f3ndot opened this issue Sep 9, 2017 · 6 comments

Comments

@f3ndot
Copy link

f3ndot commented Sep 9, 2017

Expected behavior

I can see the contents of the directory either explicitly with full path or with the . shorthand to refer to current working directory.

Actual behavior

Only explicit full path works. Using . shows empty in container.

Information

  • Diagnostic ID 4DFE61D3-E8FC-41B6-9A21-20041A237711/2017-09-09_09-30-45
  • Windows 10, latest
  • Docker for Windows, Docker version 17.06.2-ce, build cec0b72
  • Windows C: and D: drive both set to shared
  • Similar in nature to Mounted volumes are empty in the container. #25 but I'm sure is a different cause.

Steps to reproduce the behavior

  1. Explicit full path works:
    PS C:\Users\Justin> docker run --rm -v C:\Users\Justin\:/data alpine ls /data
    AppData
    Application Data
    Code
    ...
    PS C:\Users\Justin>
    
  2. But using the relative . style, which is used in my team's docker-compose.yml file, does not:
    PS C:\Users\Justin> docker run --rm -v .:/data alpine ls /data
    PS C:\Users\Justin>
    
@f3ndot
Copy link
Author

f3ndot commented Sep 9, 2017

Some more details:

PS C:\Users\Justin> docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 57
Server Version: 17.06.2-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 6e23458c129b551d5c9871e5174f6b1b7f6d1170
runc version: 810190ceaa507aa2727d7ae6f4790c76ec150bd2
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.41-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934GiB
Name: moby
ID: 5JRX:P7OY:CXB2:IKPY:OU5C:XPGP:Z2GI:M2HR:Q75A:2Q4F:Q4ID:KV6O
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 15
 Goroutines: 26
 System Time: 2017-09-09T13:50:59.1291414Z
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

@liyo
Copy link

liyo commented Nov 17, 2017

Same issue here.

@Lucas-C
Copy link

Lucas-C commented Mar 15, 2018

This may be related to moby/moby#34997

@Lucas-C
Copy link

Lucas-C commented Mar 15, 2018

It's really sad that it doesn't work with docker run -v nor docker stack,
but docker-composer makes the necessary file path conversion and it all works fine.

@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 23, 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

4 participants