-
Notifications
You must be signed in to change notification settings - Fork 438
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
[Feature] MacOS host support #36
Comments
Yea I would like in the future to support it, what blocks me for now is the host integration On MacOS podman runs in a VM, and distrobox integrates with the container's host, which in this case will be the VM, not the MacOS host I'm gonna keep this issue for the future and mark it ad blocked until we either find a solution or we create a piece of documentation that explains the situation and does not confuse the users Ironically I think (not tried yet) that distrobox on WSL2 could retain some real host integration seeing how the linux VM is tightly integrated with the Windows host 🤷 |
This comment has been minimized.
This comment has been minimized.
Yea as said I didn't try 😂 Anyway I'd stick this conversation to macos and in case there is interest open a new one for WSL2 |
I just discovered distrobox, and this was the first thought I had. I have to use a Mac for work, but would love to be able to use this for a bunch of stuff. Although podman might be difficult, maybe docker would work better, due to it's somewhat better integration into the host with HyperKit (hypervisor). I'm not really sure of the specifics of how that works, but it might be a consideration. |
On Dec 29, 2021, at 09:26, Dan Jones ***@***.***> wrote:
Although podman might be difficult, maybe docker would work better, due to it's somewhat better integration into the host with HyperKit (hypervisor).
Docker also runs in a VM on Mac OS
If the goal is to containerize and not isolate, why not consider distributing a light-weight Kubernetes distribution with this project? Something like k3s or Minikube would work perfectly for this and it has the added advantage of being able to run on Windows, Mac OS and Linux.
|
All of them share the VM problem anyway, podman docker k3s, minikube all work inside a linux VM |
Let's follow this as it's a blocker for now: containers/podman#8016 |
My two cents are that I'd love to have distrobox on macOS regardless of the lack of integration, as an easy way to automatically spin up lightweight VMs for various uses. |
Well the point of toolbox/distrobox type of software is the tight integration with the host On MacOS right now I'm not even sure graphical apps can work inside distrobox with podman-machine |
While i totally agree that tight integration with the host is what makes distrobox amazing i think there is some amount of usage for macos... I wanted to work on my personal distrobox container today and didnt have my linux machine near by and ended up doing |
@jakeHL will investigate, I don't have a Mac so it might take some time 😄 |
I daily drive an m1 macbook, Let me know if I can be of help. I'll take a look in the meantime. Would love to see this up and running |
This would be increadible - mac os is the only option at work |
1+ |
Heads up, looks like that blocker is now closed on the podman side of things: containers/podman#8016 :) |
I think podman honestly just over complicates things. Lima should be perfect for something like this - it allows for invoking commands inside a VM, sharing state between host and VM etc. Honestly its not far from doing what distrobox already does. Ive started to play with it to create a distrobox like experience and its been pretty great. Ive not tried integrating actual distrobox yet though. |
@jakeHL Hey Jake, is your work available somewhere to play with? Sounds very useful :) |
Its not, its just crappy shell aliases and functions to try and recreate the behavior. If I can get some time over the holiday break I'll tidy it up and push it. |
ok so i started messing with getting distrobox installed on macos, the install script uses Next problem is when i go to run
|
lol that error was because I didnt have my podman machine running 🤦🏻♂️... more errors on create using podman |
container stays stuck in |
Yes, this is because some parts of distrobox (init, host-exec, export) are mounted inside the container itself |
Podman on macos is also a VM based solution. I dont know of any container system that doesnt run on a vm on macos. |
yea it seems like theres something macos doesnt like about rslave mounts... i have no clue what an rslave mount is so gonna do some research to see what this does and maybe theres an alternative for macos |
https://docs.docker.com/storage/bind-mounts/#configure-bind-propagation
Well theres that answer lol |
ok so i was able to enter the container 🎉 |
overall that means that if you remove some mounts and change the home mount to be a "regular" ( |
PR to get the installer working for macos #615 |
Updated my pr to also add the changes to get |
I'm glad there is progress in this issue, thanks @kevindurb 😄 |
Potentially stupid question: How feasible is it to add MacOS support using something like Docker-OSX? |
Any updates on this? |
Same here, except I daily drive an Intel-based MacBook. Would love to help port distrobox to macOS, let me know if there is anything I should try. I’d like to have a distrobox with development tools in the same seamless way. I don’t know if being able to export is a main feature. |
I created Homebrew/discussions#4603 and hopefully getting a fully functional |
Distrobox is currently marked as compatible for Darwin systems. However, upstream currently contains an [unresolved issue](89luca89/distrobox#36) static macOS as currently unsupported, and attempts to run distrobox fail.
Distrobox is currently marked as compatible for Darwin systems. However, upstream currently contains an [unresolved issue](89luca89/distrobox#36) static macOS as currently unsupported, and attempts to run distrobox fail. (cherry picked from commit eeb7345)
I'm very interested in this too |
I would also really like for this to be a reality 👍🏻 |
just fyi for those that want this ive just tested running distrobox in lima and i think thats the solution here. No matter what way you run containers on macos they run in a vm (docker, nerdctl+lima, podman, etc) so the easiest way to run distrobox on macos is:
and then you're in a distrobox "on" macos (technically distrobox on ubuntu vm on macos), tested on apple silicon. The one oddity ive found is sometimes i need to |
If anything it might be cool to add a |
Has it been resolved? |
As of now, Homebrew lists distrobox as Linux-only, so I guess not. This was also confirmed in March, 2024, in a Homebrew discussion: https://github.com/orgs/Homebrew/discussions/5190 (at least on M1, no official support for distrobox on macOS). To be clear, this is not Homebrew's issue to fix, it's just an easy status check. @Sahil-Gulihar This issue remains open if you would like to work on it. You'll probably have to do some form of a limited-features, container-in-container solution, which I don't know the use case for that compared to directly using containers (what I personally ended up doing, it's a good-enough workaround for my use).
(I'm no longer interested in actively working on it, but would be happy to try to help if you run into an issue) |
To anyone who's interested in this: I wanted something like distrobox for a long time, after switching to a mac. Specifically designed and tested on mac but also will work anywhere supporting docker/podman. If you want to use docker instead of podman just Ctrl+F replace, it works with both. I hope this is useful to others who switched to mac and miss distrobox! |
Does it solve the issue of accessing GUI apps from host system to the docker/podman? |
You can X11 forward, its quite straightforward. Here's a guide: https://gist.github.com/sorny/969fe55d85c9b0035b0109a31cbcb088 |
FWIW I did manually get this working using podman machine and podman run -e DISPLAY=some-ip-address:0 container-image and xquartz using this guide for the xquartz bits: https://gist.github.com/sorny/969fe55d85c9b0035b0109a31cbcb088 so it's possible at least. |
Is this an effort worth exploring?
The text was updated successfully, but these errors were encountered: