From 92d61de642eb9447fe223a8439bf95dab2bb1bfa Mon Sep 17 00:00:00 2001 From: sickcodes Date: Thu, 24 Feb 2022 00:41:55 +0000 Subject: [PATCH] If you put an image at /imamge, the image will use that at runtime. Move OSX-KVM to submodule, and symlink for perfect redundancy `ln -s /home/arch/Docker-OSX/OSX-KVM /home/arch/OSX-KVM` --- .gitmodules | 3 +++ OSX-KVM | 1 + README.md | 14 ++++++++++++++ 3 files changed, 18 insertions(+) create mode 160000 OSX-KVM diff --git a/.gitmodules b/.gitmodules index 66e60a1..a5446f3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "osx-serial-generator"] path = osx-serial-generator url = https://github.com/sickcodes/osx-serial-generator.git +[submodule "OSX-KVM"] + path = OSX-KVM + url = https://github.com/kholia/OSX-KVM diff --git a/OSX-KVM b/OSX-KVM new file mode 160000 index 0000000..307cdd7 --- /dev/null +++ b/OSX-KVM @@ -0,0 +1 @@ +Subproject commit 307cdd7c9807516ffb7c4f75d053a9e877f6aef0 diff --git a/README.md b/README.md index 8af16f1..3024d07 100644 --- a/README.md +++ b/README.md @@ -57,31 +57,40 @@ First time here? try [initial setup](#initial-setup), otherwise try the instruct ### Catalina [![https://img.shields.io/docker/image-size/sickcodes/docker-osx/latest?label=sickcodes%2Fdocker-osx%3Alatest](https://img.shields.io/docker/image-size/sickcodes/docker-osx/latest?label=sickcodes%2Fdocker-osx%3Alatest)](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated) ```bash +qemu-img create -f qcow2 image.img + docker run -it \ --device /dev/kvm \ -p 50922:10022 \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e "DISPLAY=${DISPLAY:-:0.0}" \ + -v "${PWD}/image.img:/image" \ sickcodes/docker-osx:latest # docker build -t docker-osx . +# if you want to keep everything inside the container, remove "${PWD}/image.img:/image" which will tell the Dockerfile to use the image at /image ``` ### Big Sur [![https://img.shields.io/docker/image-size/sickcodes/docker-osx/big-sur?label=sickcodes%2Fdocker-osx%3Abig-sur](https://img.shields.io/docker/image-size/sickcodes/docker-osx/big-sur?label=sickcodes%2Fdocker-osx%3Abig-sur)](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated) ```bash +qemu-img create -f qcow2 image.img + docker run -it \ --device /dev/kvm \ -p 50922:10022 \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e "DISPLAY=${DISPLAY:-:0.0}" \ + -v "${PWD}/image.img:/image" \ sickcodes/docker-osx:big-sur # docker build -t docker-osx --build-arg SHORTNAME=big-sur . +# if you want to keep everything inside the container, remove "${PWD}/image.img:/image" which will tell the Dockerfile to use the image at /image ``` ### Monterey [![https://img.shields.io/docker/image-size/sickcodes/docker-osx/monterey?label=sickcodes%2Fdocker-osx%3Amonterey](https://img.shields.io/docker/image-size/sickcodes/docker-osx/monterey?label=sickcodes%2Fdocker-osx%3Amonterey)](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated) ```bash +qemu-img create -f qcow2 image.img docker run -it \ --device /dev/kvm \ @@ -90,6 +99,7 @@ docker run -it \ -e "DISPLAY=${DISPLAY:-:0.0}" \ -e GENERATE_UNIQUE=true \ -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \ + -v "${PWD}/image.img:/image" \ sickcodes/docker-osx:monterey # docker build -t docker-osx --build-arg SHORTNAME=monterey . @@ -119,12 +129,14 @@ docker run -it \ ### High Sierra [![https://img.shields.io/docker/image-size/sickcodes/docker-osx/high-sierra?label=sickcodes%2Fdocker-osx%3Ahigh-sierra](https://img.shields.io/docker/image-size/sickcodes/docker-osx/high-sierra?label=sickcodes%2Fdocker-osx%3Ahigh-sierra)](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated) ```bash +qemu-img create -f qcow2 image.img docker run -it \ --device /dev/kvm \ -p 50922:10022 \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e "DISPLAY=${DISPLAY:-:0.0}" \ + -v "${PWD}/image.img:/image" \ sickcodes/docker-osx:high-sierra # docker build -t docker-osx --build-arg SHORTNAME=high-sierra . @@ -133,12 +145,14 @@ docker run -it \ ### Mojave [![https://img.shields.io/docker/image-size/sickcodes/docker-osx/mojave?label=sickcodes%2Fdocker-osx%3Amojave](https://img.shields.io/docker/image-size/sickcodes/docker-osx/mojave?label=sickcodes%2Fdocker-osx%3Amojave)](https://hub.docker.com/r/sickcodes/docker-osx/tags?page=1&ordering=last_updated) ```bash +qemu-img create -f qcow2 image.img docker run -it \ --device /dev/kvm \ -p 50922:10022 \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e "DISPLAY=${DISPLAY:-:0.0}" \ + -v "${PWD}/image.img:/image" \ sickcodes/docker-osx:mojave # docker build -t docker-osx --build-arg SHORTNAME=mojave .