Docker command's -v option to mount a file causes it to be mounted as a directory if the local path is not specified #6867
Labels
kind/bug
Something isn't working
triage/need-to-repro
Needs to be reproduced by dev team
triage/next-candidate
Discuss if it should be moved to "Next" milestone
Actual Behavior
For the
docker
command, using the -v option to mount a file causes it to be mounted as a directory when the local path is not specifiedSteps to Reproduce
Create a test file
Mount it in docker using "-v" option for volume mount, get interactive shell in the container
Result
List files shows "test.txt" was mounted as a directory, not a file
Expected Behavior
The file should be mounted as a regular file
Additional Information
Work-around
When using the local path to the file, the -v option works correctly:
Or, using
--mount
option instead of-v
works correctly, because it requires the path$ ls -l
then shows:Using
--mount
without the local path gives an error:Rancher Desktop Version
1.13.1
Rancher Desktop K8s Version
n/a
Which container engine are you using?
moby (docker cli)
What operating system are you using?
macOS
Operating System / Build Version
MacOS Ventura 13.6.6 (22G630)
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
None
Windows User Only
No response
The text was updated successfully, but these errors were encountered: