From 408248ae4f95f4c2760afa94bfb06d799c7317f8 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Thu, 4 Mar 2021 09:12:50 +0000 Subject: Missing WIDTH and HEIGHT from naked and auto Dockerfiles --- Dockerfile.auto | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index ca6e548..a5b03a8 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -152,11 +152,13 @@ CMD echo "${BOILERPLATE}" \ ; } \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \ ./Docker-OSX/custom/generate-unique-machine-values.sh \ - --count 1 \ - --tsv ./serial.tsv \ - --bootdisks \ - --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ - --output-env "${ENV:=/env}" || exit 1 \ + --count 1 \ + --tsv ./serial.tsv \ + --bootdisks \ + --width "${WIDTH:-1920}" \ + --height "${HEIGHT:-1080}" \ + --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ + --output-env "${ENV:=/env}" || exit 1 \ ; } \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ source "${ENV:=/env}" \ @@ -166,6 +168,8 @@ CMD echo "${BOILERPLATE}" \ --board-serial "${BOARD_SERIAL}" \ --uuid "${UUID}" \ --mac-address "${MAC_ADDRESS}" \ + --width "${WIDTH:-1920}" \ + --height "${HEIGHT:-1080}" \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" || exit 1 \ ; } \ ; case "$(file --brief /bootdisk)" in \ -- cgit v1.2.3 From 377c4e7cc5cdd785e965e13e15086c2326797b51 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Thu, 4 Mar 2021 09:52:45 +0000 Subject: Add -e MASTER_PLIST_URL to change the input config.plist at runtime. --- Dockerfile.auto | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index a5b03a8..d203551 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -152,6 +152,7 @@ CMD echo "${BOILERPLATE}" \ ; } \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \ ./Docker-OSX/custom/generate-unique-machine-values.sh \ + --master-plist-url="${MASTER_PLIST_URL}" \ --count 1 \ --tsv ./serial.tsv \ --bootdisks \ @@ -163,6 +164,7 @@ CMD echo "${BOILERPLATE}" \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ source "${ENV:=/env}" \ || ./Docker-OSX/custom/generate-specific-bootdisk.sh \ + --master-plist-url="${MASTER_PLIST_URL}" \ --model "${DEVICE_MODEL}" \ --serial "${SERIAL}" \ --board-serial "${BOARD_SERIAL}" \ -- cgit v1.2.3 From 45a5f2c074de948eaef8d48bde2a3df9ce238289 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Thu, 4 Mar 2021 11:57:52 +0000 Subject: wget -O case sensitive, silence source /env errors. --- Dockerfile.auto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index d203551..b5ac7da 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -162,8 +162,8 @@ CMD echo "${BOILERPLATE}" \ --output-env "${ENV:=/env}" || exit 1 \ ; } \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ - source "${ENV:=/env}" \ - || ./Docker-OSX/custom/generate-specific-bootdisk.sh \ + source "${ENV:=/env}" 2>/dev/null \ + ; ./Docker-OSX/custom/generate-specific-bootdisk.sh \ --master-plist-url="${MASTER_PLIST_URL}" \ --model "${DEVICE_MODEL}" \ --serial "${SERIAL}" \ -- cgit v1.2.3 From 4b278bc42c10c29fc8592d018bf2e59678cf8174 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Thu, 4 Mar 2021 12:05:41 +0000 Subject: Shift exits --- Dockerfile.auto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index b5ac7da..1e0c84e 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -159,7 +159,7 @@ CMD echo "${BOILERPLATE}" \ --width "${WIDTH:-1920}" \ --height "${HEIGHT:-1080}" \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ - --output-env "${ENV:=/env}" || exit 1 \ + --output-env "${ENV:=/env}" \ ; } \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ source "${ENV:=/env}" 2>/dev/null \ @@ -172,7 +172,7 @@ CMD echo "${BOILERPLATE}" \ --mac-address "${MAC_ADDRESS}" \ --width "${WIDTH:-1920}" \ --height "${HEIGHT:-1080}" \ - --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" || exit 1 \ + --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ ; } \ ; case "$(file --brief /bootdisk)" in \ QEMU\ QCOW2\ Image* ) export BOOTDISK=/bootdisk \ -- cgit v1.2.3 From 2077c3a45354ed6beb753afaed49d789d94a25b6 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Thu, 4 Mar 2021 13:22:13 +0000 Subject: v4.1 WIDTH/HEIGHT && move resolution README note --- Dockerfile.auto | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index 1e0c84e..7586eee 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -3,13 +3,14 @@ # / __ \____ _____/ /_____ _____/ __ \/ ___/ |/ / # / / / / __ \/ ___/ //_/ _ \/ ___/ / / /\__ \| / # / /_/ / /_/ / /__/ ,< / __/ / / /_/ /___/ / | -# /_____/\____/\___/_/|_|\___/_/ \____//____/_/|_| AUTOINSTALL +# /_____/\____/\___/_/|_|\___/_/ \____//____/_/|_| :AUTO # -# Title: Mac on Docker (Docker-OSX) [AUTOINSTALL] -# Author: Sick.Codes https://twitter.com/sickcodes -# Version: 4.0 +# Title: Docker-OSX (Mac on Docker) +# Author: Sick.Codes https://twitter.com/sickcodes +# Version: 4.1 # License: GPLv3+ # Repository: https://github.com/sickcodes/Docker-OSX +# Website: https://sick.codes # # This Dockerfile is a pre-installed naked installation of Docker-OSX! # -- cgit v1.2.3 From 8935ce08abc371911f2d6e2e24aff6b9bc64827a Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sat, 6 Mar 2021 17:48:15 +0000 Subject: Fix bootdisk not getting written to persistent file when using NOPICKER=true. NOPICKER=true is overridden by a custom plist now anyway. --- Dockerfile.auto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index 7586eee..4b186f4 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -149,7 +149,7 @@ CMD echo "${BOILERPLATE}" \ ; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \ ; [[ "${NOPICKER}" == true ]] && { \ sed -i '/^.*InstallMedia.*/d' Launch.sh \ - && export BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2 \ + && export BOOTDISK="${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \ ; } \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \ ./Docker-OSX/custom/generate-unique-machine-values.sh \ -- cgit v1.2.3 From 7d6e5b30d872a3e8fdc65099ed691dadabc46220 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sat, 6 Mar 2021 17:59:03 +0000 Subject: Remove useless case statements. Allow -e HEADLESS=true as human readable alternative to -e DISPLAY=:99. --- Dockerfile.auto | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index 4b186f4..90bb432 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -133,6 +133,8 @@ ENV BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2 ENV DISPLAY=:99 +ENV HEADLESS=false + ENV ENV=/env ENV IMAGE_PATH=/home/arch/OSX-KVM/mac_hdd_ng.img @@ -175,21 +177,10 @@ CMD echo "${BOILERPLATE}" \ --height "${HEIGHT:-1080}" \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ ; } \ - ; case "$(file --brief /bootdisk)" in \ - QEMU\ QCOW2\ Image* ) export BOOTDISK=/bootdisk \ - ;; \ - directory* ) export BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 \ - ;; \ - esac \ - ; [[ "${DISPLAY}" = ':99' ]] && { \ + ; { [[ "${DISPLAY}" = ':99' ]] || [[ "${HEADLESS}" == true ]] ; } && { \ nohup Xvfb :99 -screen 0 1920x1080x16 \ - & until [[ "$(xrandr --query 2>/dev/null)" ]]; do sleep 0.1 ; done \ + & until [[ "$(xrandr --query 2>/dev/null)" ]]; do sleep 1 ; done \ ; } \ - ; echo "Checking whether /image is a directory or a QEMU disk." \ - ; case "$(file --brief /image)" in \ - QEMU*) export IMAGE_PATH=/image;; \ - directory*) export IMAGE_PATH=/home/arch/OSX-KVM/mac_hdd_ng.img;; \ - esac \ ; stat "${IMAGE_PATH}" \ ; echo "Large image is being copied between layers, please wait a minute..." \ ; ./enable-ssh.sh \ -- cgit v1.2.3 From 7382df8fa1fbc922827981a4cfd03c03b7888fb3 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sat, 6 Mar 2021 19:18:23 +0000 Subject: Fix BOOTDISK expected logic --- Dockerfile.auto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index 90bb432..3ea721d 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -129,7 +129,7 @@ RUN if [[ "${COMPLETE}" ]]; then \ && wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \ ; fi -ENV BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2 +ENV BOOTDISK ENV DISPLAY=:99 @@ -151,8 +151,9 @@ CMD echo "${BOILERPLATE}" \ ; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \ ; [[ "${NOPICKER}" == true ]] && { \ sed -i '/^.*InstallMedia.*/d' Launch.sh \ - && export BOOTDISK="${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \ + && export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \ ; } \ + || export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \ ./Docker-OSX/custom/generate-unique-machine-values.sh \ --master-plist-url="${MASTER_PLIST_URL}" \ -- cgit v1.2.3 From c2916fd48748ff15dbb8cb79cc9b5655e4d509eb Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sat, 6 Mar 2021 19:25:26 +0000 Subject: Dockerfile syntax error. --- Dockerfile.auto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index 3ea721d..a9cb6a5 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -129,7 +129,7 @@ RUN if [[ "${COMPLETE}" ]]; then \ && wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \ ; fi -ENV BOOTDISK +ENV BOOTDISK= ENV DISPLAY=:99 -- cgit v1.2.3 From 5a71e1975692f153e3022a8a2c877d82e32cd6f6 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Tue, 9 Mar 2021 16:55:18 +0000 Subject: ./custom is now ./osx-serial-generator via submodule. Submodule inits. --- Dockerfile.auto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index a9cb6a5..65efef8 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -79,7 +79,7 @@ RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst \ RUN pacman -Syu xorg-server-xvfb wget xterm xorg-xhost xorg-xrandr sshpass --noconfirm \ && if [[ "${SCROT}" ]]; then \ pacman -Syu scrot base-devel --noconfirm \ - && git clone https://github.com/stolk/imcat.git \ + && git clone --recurse-submodules --depth 1 https://github.com/stolk/imcat.git \ && cd imcat \ && make \ && sudo cp imcat /usr/bin/imcat \ @@ -155,7 +155,7 @@ CMD echo "${BOILERPLATE}" \ ; } \ || export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \ - ./Docker-OSX/custom/generate-unique-machine-values.sh \ + ./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \ --master-plist-url="${MASTER_PLIST_URL}" \ --count 1 \ --tsv ./serial.tsv \ @@ -167,7 +167,7 @@ CMD echo "${BOILERPLATE}" \ ; } \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ source "${ENV:=/env}" 2>/dev/null \ - ; ./Docker-OSX/custom/generate-specific-bootdisk.sh \ + ; ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \ --master-plist-url="${MASTER_PLIST_URL}" \ --model "${DEVICE_MODEL}" \ --serial "${SERIAL}" \ -- cgit v1.2.3 From e4c0b642004c0d47e4fe28749e851a27815809ba Mon Sep 17 00:00:00 2001 From: sickcodes Date: Tue, 9 Mar 2021 20:34:09 +0000 Subject: FIRST: sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" --- Dockerfile.auto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index 65efef8..c5d199f 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -148,7 +148,8 @@ ENV BOILERPLATE="By using this Dockerfile, you hereby agree that you are a secur CMD echo "${BOILERPLATE}" \ ; [[ "${TERMS_OF_USE}" = i_agree ]] || exit 1 \ ; echo "Disk is being copied between layers... Please wait a minute..." \ - ; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \ + ; sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" || true \ + ; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" || true \ ; [[ "${NOPICKER}" == true ]] && { \ sed -i '/^.*InstallMedia.*/d' Launch.sh \ && export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \ -- cgit v1.2.3 From 9e7342f9662e7a958df90d0cbab53b15067dc2ff Mon Sep 17 00:00:00 2001 From: sickcodes Date: Wed, 24 Mar 2021 13:40:16 +0000 Subject: Add all ENV variables to each dockerfile for readability. Add RAM allocation buffer and cache drop bug fix. Add kvm and libvirt groups. Add IMAGE_FORMAT=qcow2 to allow IMAGE_FORMAT=raw too. --- Dockerfile.auto | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index c5d199f..ff7d5e6 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -7,7 +7,7 @@ # # Title: Docker-OSX (Mac on Docker) # Author: Sick.Codes https://twitter.com/sickcodes -# Version: 4.1 +# Version: 4.2 # License: GPLv3+ # Repository: https://github.com/sickcodes/Docker-OSX # Website: https://sick.codes @@ -115,20 +115,25 @@ RUN mkdir -p ~/.ssh \ ARG COMPLETE=true -# Feel free to take a copy of this image and then host it internally -ARG IMAGE_URL='https://images2.sick.codes/mac_hdd_ng_auto.img' - # use the COMPLETE arg, for a complete image, ready to boot. # otherwise use your own image: -v "$PWD/disk.img":/image ARG WGET_OPTIONS= # ARG WGET_OPTIONS='--no-verbose' +# Feel free to take a copy of this image and then host it internally +ARG IMAGE_URL='https://images.sick.codes/mac_hdd_ng_auto.img' +# ARG IMAGE_URL='https://images.sick.codes/mac_hdd_ng_auto_big_sur.img' + RUN if [[ "${COMPLETE}" ]]; then \ - echo "Downloading 20GB+ image... This step might take a while... Press Ctrl+C if you want to abort." \ + echo "Downloading 20GB image... This step might take a while... Press Ctrl+C if you want to abort." \ ; rm -f /home/arch/OSX-KVM/mac_hdd_ng.img \ && wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \ ; fi +#### SPECIAL RUNTIME ARGUMENTS BELOW + +ENV ADDITIONAL_PORTS= + ENV BOOTDISK= ENV DISPLAY=:99 @@ -137,10 +142,34 @@ ENV HEADLESS=false ENV ENV=/env +# Boolean for generating a bootdisk with new random serials. +ENV GENERATE_UNIQUE=false + +# Boolean for generating a bootdisk with specific serials. +ENV GENERATE_SPECIFIC=false + ENV IMAGE_PATH=/home/arch/OSX-KVM/mac_hdd_ng.img +ENV IMAGE_FORMAT=qcow2 + +ENV KVM='accel=kvm:tcg' + +# ENV MASTER_PLIST_URL="https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist" + +# ENV NETWORKING=e1000-82545em +ENV NETWORKING=vmxnet3 ENV NOPICKER=true +# dynamic RAM options for runtime +ENV RAM=3 +# ENV RAM=max +# ENV RAM=half + +# The x and y coordinates for resolution. +# Must be used with either -e GENERATE_UNIQUE=true or -e GENERATE_SPECIFIC=true. +ENV WIDTH=1920 +ENV HEIGHT=1080 + ENV TERMS_OF_USE=i_agree ENV BOILERPLATE="By using this Dockerfile, you hereby agree that you are a security reseacher or developer and agree to use this Dockerfile to make the world a safer place. Examples include: making your apps safer, finding your mobile phone, compiling security products, etc. You understand that Docker-OSX is an Open Source project, which is released to the public under the GNU Pulic License version 3 and above. You acknowledge that the Open Source project is absolutely unaffiliated with any third party, in any form whatsoever. Any trademarks or intelectual property which happen to be mentioned anywhere in or around the project are owned by their respective owners. By using this Dockerfile, you agree to agree to the EULA of each piece of upstream or downstream software. The following code is released for the sole purpose of security research, under the GNU Public License version 3. If you are concerned about the licensing, please note that this project is not AGPL. A copy of the license is available online: https://github.com/sickcodes/Docker-OSX/blob/master/LICENSE. In order to use the following Dockerfile you must read and understand the terms. Once you have read the terms, use the -e TERMS_OF_USE=i_agree or -e TERMS_OF_USE=i_disagree" -- cgit v1.2.3 From 2414f466d0c6fd142734630c8206137695233575 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Wed, 24 Mar 2021 21:16:03 +0000 Subject: Enable interactive QEMU. Remove envsubst since we are already using bash. Add -x flag --- Dockerfile.auto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index ff7d5e6..8175e3e 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -7,7 +7,7 @@ # # Title: Docker-OSX (Mac on Docker) # Author: Sick.Codes https://twitter.com/sickcodes -# Version: 4.2 +# Version: 4.3 # License: GPLv3+ # Repository: https://github.com/sickcodes/Docker-OSX # Website: https://sick.codes -- cgit v1.2.3 From 6243c33e47039920dbcd11727aff2cb50096d9a8 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sun, 28 Mar 2021 10:17:47 +0000 Subject: Remove envsubst to allow interactive QEMU using -i --- Dockerfile.auto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index 8175e3e..170029f 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -219,7 +219,7 @@ CMD echo "${BOILERPLATE}" \ /usr/bin/ssh-keygen -t rsa -f ~/.ssh/id_docker_osx -q -N "" \ && chmod 600 ~/.ssh/id_docker_osx \ ; } \ - ; envsubst < ./Launch.sh | bash \ + ; /bin/bash -c ./Launch.sh \ & echo "Booting Docker-OSX in the background. Please wait..." \ ; until [[ "$(sshpass -palpine ssh-copy-id -f -i ~/.ssh/id_docker_osx.pub -p 10022 user@127.0.0.1)" ]]; do \ echo "Disk is being copied between layers. Repeating until able to copy SSH key into OSX..." \ -- cgit v1.2.3 From 19439bf2bda7c592098c0d4da0f74182e9713e70 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sun, 18 Apr 2021 10:54:43 +0000 Subject: Add LIBGUESTFS debug & trace commands, exit on fail. Update credits --- Dockerfile.auto | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index 170029f..56aba71 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -170,6 +170,10 @@ ENV RAM=3 ENV WIDTH=1920 ENV HEIGHT=1080 +# libguestfs verbose +ENV LIBGUESTFS_DEBUG=1 +ENV LIBGUESTFS_TRACE=1 + ENV TERMS_OF_USE=i_agree ENV BOILERPLATE="By using this Dockerfile, you hereby agree that you are a security reseacher or developer and agree to use this Dockerfile to make the world a safer place. Examples include: making your apps safer, finding your mobile phone, compiling security products, etc. You understand that Docker-OSX is an Open Source project, which is released to the public under the GNU Pulic License version 3 and above. You acknowledge that the Open Source project is absolutely unaffiliated with any third party, in any form whatsoever. Any trademarks or intelectual property which happen to be mentioned anywhere in or around the project are owned by their respective owners. By using this Dockerfile, you agree to agree to the EULA of each piece of upstream or downstream software. The following code is released for the sole purpose of security research, under the GNU Public License version 3. If you are concerned about the licensing, please note that this project is not AGPL. A copy of the license is available online: https://github.com/sickcodes/Docker-OSX/blob/master/LICENSE. In order to use the following Dockerfile you must read and understand the terms. Once you have read the terms, use the -e TERMS_OF_USE=i_agree or -e TERMS_OF_USE=i_disagree" @@ -177,7 +181,7 @@ ENV BOILERPLATE="By using this Dockerfile, you hereby agree that you are a secur CMD echo "${BOILERPLATE}" \ ; [[ "${TERMS_OF_USE}" = i_agree ]] || exit 1 \ ; echo "Disk is being copied between layers... Please wait a minute..." \ - ; sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" || true \ + ; sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \ ; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" || true \ ; [[ "${NOPICKER}" == true ]] && { \ sed -i '/^.*InstallMedia.*/d' Launch.sh \ @@ -194,7 +198,7 @@ CMD echo "${BOILERPLATE}" \ --height "${HEIGHT:-1080}" \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ --output-env "${ENV:=/env}" \ - ; } \ + || exit 1 ; } \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ source "${ENV:=/env}" 2>/dev/null \ ; ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \ @@ -207,7 +211,7 @@ CMD echo "${BOILERPLATE}" \ --width "${WIDTH:-1920}" \ --height "${HEIGHT:-1080}" \ --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ - ; } \ + || exit 1 ; } \ ; { [[ "${DISPLAY}" = ':99' ]] || [[ "${HEADLESS}" == true ]] ; } && { \ nohup Xvfb :99 -screen 0 1920x1080x16 \ & until [[ "$(xrandr --query 2>/dev/null)" ]]; do sleep 1 ; done \ -- cgit v1.2.3 From 309ff1cd5170245273c8e9dba2673a5b0c517e78 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sun, 18 Apr 2021 19:28:03 +0000 Subject: Downgrade file to 5.39 due to libguestfs bug. All Dockerfiles though. --- Dockerfile.auto | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index 56aba71..937bcc3 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -99,6 +99,13 @@ RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst \ && bsdtar -C / -xvf "${patched_glibc}" || echo "Everything is fine." # TEMP-FIX for pacman issue +# TEMP-FIX for file 5.40 libguestfs issue +RUN yes | pacman -U https://archive.archlinux.org/packages/f/file/file-5.39-1-x86_64.pkg.tar.zst \ + && patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst \ + && curl -LO "https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/${patched_glibc}" \ + && bsdtar -C / -xvf "${patched_glibc}" || echo "Everything is fine." +# TEMP-FIX for file 5.40 libguestfs issue + USER arch WORKDIR /home/arch/OSX-KVM -- cgit v1.2.3 From 5dc2f4fd044b4afa27f0f23e30bbc2f56aa9c232 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Tue, 27 Apr 2021 22:58:05 +0000 Subject: Temp Fix Failed to boot OSX with GENERATE_UNIQUE #244 --- Dockerfile.auto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile.auto') diff --git a/Dockerfile.auto b/Dockerfile.auto index 937bcc3..6ec56fc 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -100,7 +100,7 @@ RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst \ # TEMP-FIX for pacman issue # TEMP-FIX for file 5.40 libguestfs issue -RUN yes | pacman -U https://archive.archlinux.org/packages/f/file/file-5.39-1-x86_64.pkg.tar.zst \ +RUN yes | sudo pacman -U https://archive.archlinux.org/packages/f/file/file-5.39-1-x86_64.pkg.tar.zst \ && patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst \ && curl -LO "https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/${patched_glibc}" \ && bsdtar -C / -xvf "${patched_glibc}" || echo "Everything is fine." -- cgit v1.2.3