minikube: macOS mount: mounted directory is empty
Is this a BUG REPORT or FEATURE REQUEST? Bug report
Please provide the following details:
Environment:
Minikube version: v0.25.0
- OS: macOS 10.13.2
- VM Driver: hyperkit
- ISO version: v0.25.1
- Others: kubernetes v1.7.5
What happened: Tried to mount a host directory into a container. The directory inside the container is empty.
What you expected to happen: The directory inside the container should give access to the mounted directory on the host. At least, that was the behavior when I was using minikube and VirtualBox!
How to reproduce it:
$ eval $(minikube docker-env)
$ mkdir test; cd test; echo 'hello' > test.txt
$ docker run --rm -it -v $(pwd):/testmount alpine
(now inside alpoine container)
/ # cd testmount
/testmount # ls -l
total 0
Anything else do we need to know: Is this not possible when using hyperkit? If not, what is the alternative? I noticed some options relating to NFS, but I didnβt dig too deeply. Iβd prefer to just use the standard Docker volume mount mechanism if possible.
Thank you!
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 29
- Comments: 47 (4 by maintainers)
More than three years since this issue was opened⦠it is still reproducible under Minikube v1.24.0 and Hyperkit 0.20200908
Iβm suffering this issue as well π
Itβs a poor workaround to be sure, but this command left running in a terminal
Seems to make the above testcase work as expected
just give up on windows
Is this issue fixed? iβm still having issue on v1.12.1
Workaround this issue by using
scpto copy the files into the VM:Very unreliable 9P mounts on Hyperkit, MacOS 11.6 and minikube 1.23.1 Some files present and with 444 permissions in my host file system are unseen from the container mounting the dir, while some of those files are seen as directories⦠File flags and attributes are a mess I would say.
I was planning to replace docker desktop with minikube but migration of existing volumes has been very difficult so far, because of these minikube bugs.
My Minikube version is: v1.18.1 Docker version: 20.10.5 OS: Endeavour (Arch base) Linux Kernel: 5.4.101-1-lts54
Currently working by manually running the mount command after start, but shouldnt this be at start?
I do not have the same problem when running with the
virtualboxdriver. Maybe virtual box should be flagged as the preferred driver instead of Docker: https://minikube.sigs.k8s.io/docs/drivers/Iβm having the same issue, no directory is being created at all. Iβm using minikube v1.8.2
I had a similar problem on M1 Mac and ended up solving it using this command:
minikube mount /Users:/Users+1 same issue here