Steps to reproduce the issue:
This is a feature request; there's no failed command here to document. That said:
It would be really nice if the docker vm-driver allowed mapping paths from the local filesystem into the minikube container, using docker's volume binding functionality. E.g.,
minikube config set vm-driver docker
minikube start --docker-volume=/home/ptramsey:/home/ptramsey
... which would internally call something like,
docker run -v /home/ptramsey:/home/ptramsey gcr.io/k8s-minikube/kicbase:v0.0.8 /usr/local/bin/entrypoint
As it is, despite running without virtualization on linux (which has a noticeable performance advantage), we're stuck using nfs or 9p to mount host paths inside minikube, both of which are slower (the latter of which is much slower) than just mapping the path directly via docker.
Hey @ptramsey thanks for opening this issue -- this seems like a reasonable feature request. If anybody would be interested in working on this, please comment here!
Currently we are mounting the /var directory as a docker volume, so that's the current workaround.
i.e. use this host directory, for getting things into the container ?
See e.g. docker volume inspect minikube for the details on it
Mounting the /home directory has security implications, some want it disabled by default for VMs...
See #6788
And #5012
Having the ability to specify arbitrary directories that aren't /var, though, is useful, and I would be surprised if people aren't already depending on that functionality, since the hyperkit driver on macos has it. Also, the virtualbox driver by default mounts /Users on macos and windows, and mounts /home to /hosthome on linux.
If people are concerned about mounting /home itself, to the extent that we think it should be completely disallowed (rather than just being a warning), it seems like this feature request could still be accomplished with that change. After all, the feature request doesn't refer to mounting /home anyway --- the example it presents is of mounting a specific home directory (that isn't /home/minikube).
Agree, adding the possibility to add mounts in the docker/podman driver would be a nice feature.
/assign
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
/remove-lifecycle stale
Most helpful comment
Agree, adding the possibility to add mounts in the docker/podman driver would be a nice feature.