mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-11 21:10:25 +01:00
Share directories from host->guest via qemu:-virtfs, osx:mount_p9 #43
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sck on GitHub (Jun 21, 2020).
I was looking into getting NFS working but then I came across this much more convenient way: in the qemu command-line options add:
(
<id>can be the same as<volume name>)and then in OSX:
I think mount_9p was added in Mojave (10.14)
@sickcodes commented on GitHub (Jun 21, 2020):
You can use the
-e EXTRA=“-somearg”to add qemu args@sickcodes commented on GitHub (Jul 4, 2020):
This is great btw, can I add this to the repo?
@sck commented on GitHub (Jul 4, 2020):
Yeah, this is why I documented it here... I thought NFS is much too complicated to use inside docker, with the required kernel support and all, mount_9p is straightforward. Makes creating build servers much easier, along with the automatic booting from the macos disk https://github.com/sickcodes/Docker-OSX/issues/53 :)
@sickcodes commented on GitHub (Jul 21, 2020):
Thanks for this btw, just used it myself!
@mmausler commented on GitHub (Dec 12, 2020):
For anyone else trying to set up a share directory between guest and host, here is what ended up working for me. I had to add my host directory as a docker volume, then reference the docker volume path in the virtfs command options.
Since the virtfs passthrough uses host permissions on all files in the share directory, you can change the OS X user to the same ID as your host user ID and read/write should work as expected. This post was helpful in that regard
https://www.inteller.net/notes/change-user-id-on-snow-leopard
@coppercash commented on GitHub (Dec 28, 2020):
I tried
mount_9pseveral months ago.But the performance was disappointing.
I put my source files (an iOS project) on the shared drive, and tried to build from there.
It was obviously much slower than on a native drive.
Even worse, it crashed at some middle point in the building process.
I couldn't find more relative information on the Internet and stopped trying.
I hope it was just my case.
Because directory sharing is so convenient and wanted.
@sickcodes commented on GitHub (Mar 10, 2021):
Working to implement the solutions mentioned in this issue now!
@sickcodes commented on GitHub (Mar 11, 2021):
@gombosg commented on GitHub (Jan 4, 2022):
@sickcodes actually this (https://github.com/sickcodes/Docker-OSX/issues/52#issuecomment-743473409) is very important to get sharing work both ways. Can I create a PR to add a link to the docs?
@manang commented on GitHub (Apr 13, 2022):
I tried to change the uuid of the user from 501 to 1001 (it is the uuid of my user on my host vm). I'm not able to write on the shared disk.
do you know how I can solve it?
Thanks