sickcodes / Docker-OSX

Run macOS VM in a Docker! Run near native OSX-KVM in Docker! X11 Forwarding! CI/CD for OS X Security Research! Docker mac Containers.
https://hub.docker.com/r/sickcodes/docker-osx
GNU General Public License v3.0
36.1k stars 1.78k forks source link

Can I run `Docker-OSX` under podman? #381

Open leiless opened 2 years ago

leiless commented 2 years ago

Hi, all. I wonder if I can run Docker-OSX inside podman?

My OS is Ubuntu 20.04 LTS(x86_64) with Podman 3.3.1

dmann18181 commented 2 years ago

I am interested in running this inside podman as well.

My OS is Fedora 35(x86_64) with podman 3.4.1

sickcodes commented 2 years ago

I haven't used podman before but I assume yes, if it's just a Docker wrapper

bphd commented 1 year ago

I haven't used podman before but I assume yes, if it's just a Docker wrapper

It's more than a wrapper, and everybody should transit to podman, at least for security purposes, if not philosophical

leunardo commented 1 year ago

I managed to make it work on podman + wsl with ubuntu 22.

Had to set podman machine to rootful, otherwise the mac does not have internet access and fails to install the OS. (Probably there is a right way to do it, but this worked for me)

On ubuntu, I ran echo $DISPLAY to find the display config used, which outputs :0. Then I replaced the -e "DISPLAY=${DISPLAY:-:0.0}" for -e "DISPLAY=:0". Using the original command was giving me lkg errors.

Final command was

podman run -it --device /dev/kvm -p 50922:10022 -v /mnt/wslg/.X11-unix:/tmp/.X11-unix -e "DISPLAY=:0" sickcodes/docker-osx:latest
bphd commented 1 year ago

I managed to make it work on podman + wsl with ubuntu 22.

Had to set podman machine to rootful, otherwise the mac does not have internet access and fails to install the OS. (Probably there is a right way to do it, but this worked for me)

On ubuntu, I ran echo $DISPLAY to find the display config used, which outputs :0. Then I replaced the -e "DISPLAY=${DISPLAY:-:0.0}" for -e "DISPLAY=:0". Using the original command was giving me lkg errors.

Final command was

podman run -it --device /dev/kvm -p 50922:10022 -v /mnt/wslg/.X11-unix:/tmp/.X11-unix -e "DISPLAY=:0" sickcodes/docker-osx:latest

The project should really shift to PodMan, then after if possible to rootless (by fine tuning things like internet or so)