You've already forked Docker-OSX
mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2025-07-03 03:03:31 -05:00
Compare commits
14 Commits
netdev
...
libguestfs
Author | SHA1 | Date | |
---|---|---|---|
24033387a3 | |||
7dfd04eafd | |||
5806f862d3 | |||
5a159c19e9 | |||
50c5dce110 | |||
ff250fa0ca | |||
302885dc08 | |||
fcfba30086 | |||
df10b3c651 | |||
e265065e31 | |||
beef908d4c | |||
12b8ce7a2b | |||
9c8d70c9da | |||
363bac93a9 |
@ -93,3 +93,5 @@ This project now uses the fantastic OpenCore bootloader from the community OpenC
|
|||||||
[@cybik](https://github.com/cybik) Spice fix #337
|
[@cybik](https://github.com/cybik) Spice fix #337
|
||||||
|
|
||||||
[@Silfalion](https://github.com/Silfalion) - [https://github.com/Silfalion/Iphone_docker_osx_passthrough](https://github.com/Silfalion/Iphone_docker_osx_passthrough)
|
[@Silfalion](https://github.com/Silfalion) - [https://github.com/Silfalion/Iphone_docker_osx_passthrough](https://github.com/Silfalion/Iphone_docker_osx_passthrough)
|
||||||
|
|
||||||
|
[@Buthrakaur](https://github.com/Buthrakaur) readme - improve instructions for running on windows #361
|
95
Dockerfile
95
Dockerfile
@ -52,8 +52,7 @@
|
|||||||
# # you will also need to pass the device to the container
|
# # you will also need to pass the device to the container
|
||||||
|
|
||||||
FROM archlinux:base-devel
|
FROM archlinux:base-devel
|
||||||
|
LABEL maintainer='https://twitter.com/sickcodes <https://sick.codes>'
|
||||||
MAINTAINER 'https://twitter.com/sickcodes' <https://sick.codes>
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
@ -167,13 +166,6 @@ RUN [[ "${VERSION%%.*}" -ge 11 ]] && { wget "${FETCH_MAC_OS_RAW}" \
|
|||||||
|
|
||||||
WORKDIR /home/arch/OSX-KVM
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
ARG LINUX=true
|
|
||||||
|
|
||||||
# required to use libguestfs inside a docker container, to create bootdisks for docker-osx on-the-fly
|
|
||||||
RUN if [[ "${LINUX}" == true ]]; then \
|
|
||||||
sudo pacman -Syu linux libguestfs --noconfirm \
|
|
||||||
; fi
|
|
||||||
|
|
||||||
# optional --build-arg to change branches for testing
|
# optional --build-arg to change branches for testing
|
||||||
ARG BRANCH=master
|
ARG BRANCH=master
|
||||||
ARG REPO='https://github.com/sickcodes/Docker-OSX.git'
|
ARG REPO='https://github.com/sickcodes/Docker-OSX.git'
|
||||||
@ -200,7 +192,7 @@ RUN touch Launch.sh \
|
|||||||
&& tee -a Launch.sh <<< '-smbios type=2 \' \
|
&& tee -a Launch.sh <<< '-smbios type=2 \' \
|
||||||
&& tee -a Launch.sh <<< '-audiodev ${AUDIO_DRIVER:-alsa},id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda \' \
|
&& tee -a Launch.sh <<< '-audiodev ${AUDIO_DRIVER:-alsa},id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda \' \
|
||||||
&& tee -a Launch.sh <<< '-device ich9-ahci,id=sata \' \
|
&& tee -a Launch.sh <<< '-device ich9-ahci,id=sata \' \
|
||||||
&& tee -a Launch.sh <<< '-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2} \' \
|
&& tee -a Launch.sh <<< '-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=${BOOTDISK:-/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2} \' \
|
||||||
&& tee -a Launch.sh <<< '-device ide-hd,bus=sata.2,drive=OpenCoreBoot \' \
|
&& tee -a Launch.sh <<< '-device ide-hd,bus=sata.2,drive=OpenCoreBoot \' \
|
||||||
&& tee -a Launch.sh <<< '-device ide-hd,bus=sata.3,drive=InstallMedia \' \
|
&& tee -a Launch.sh <<< '-device ide-hd,bus=sata.3,drive=InstallMedia \' \
|
||||||
&& tee -a Launch.sh <<< '-drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 \' \
|
&& tee -a Launch.sh <<< '-drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 \' \
|
||||||
@ -216,30 +208,83 @@ RUN touch Launch.sh \
|
|||||||
# docker exec containerid mv ./Launch-nopicker.sh ./Launch.sh
|
# docker exec containerid mv ./Launch-nopicker.sh ./Launch.sh
|
||||||
# This is now a legacy command.
|
# This is now a legacy command.
|
||||||
# You can use -e BOOTDISK=/bootdisk with -v ./bootdisk.img:/bootdisk
|
# You can use -e BOOTDISK=/bootdisk with -v ./bootdisk.img:/bootdisk
|
||||||
|
|
||||||
|
### LEGACY CODE
|
||||||
RUN grep -v InstallMedia ./Launch.sh > ./Launch-nopicker.sh \
|
RUN grep -v InstallMedia ./Launch.sh > ./Launch-nopicker.sh \
|
||||||
&& chmod +x ./Launch-nopicker.sh \
|
&& chmod +x ./Launch-nopicker.sh \
|
||||||
&& sed -i -e s/OpenCore\.qcow2/OpenCore\-nopicker\.qcow2/ ./Launch-nopicker.sh
|
&& sed -i -e s/OpenCore\.qcow2/OpenCore\-nopicker\.qcow2/ ./Launch-nopicker.sh
|
||||||
|
###
|
||||||
|
|
||||||
USER arch
|
USER arch
|
||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
# 5.13 problem
|
#### libguestfs versioning
|
||||||
|
|
||||||
|
# 5.13+ problem resolved by building the qcow2 against 5.12 using libguestfs-1.44.1-6
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
||||||
|
|
||||||
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
||||||
|
ENV KERNEL_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV LIBGUESTFS_PACKAGE_URL=https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-6-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
RUN sudo pacman -Rns linux --noconfirm \
|
ARG LINUX=true
|
||||||
; sudo pacman -Syy \
|
|
||||||
; sudo pacman -S mkinitcpio --noconfirm \
|
# required to use libguestfs inside a docker container, to create bootdisks for docker-osx on-the-fly
|
||||||
; sudo pacman -U https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst --noconfirm \
|
RUN if [[ "${LINUX}" == true ]]; then \
|
||||||
; sudo rm -rf /var/tmp/.guestfs-* \
|
sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm \
|
||||||
; libguestfs-test-tool
|
; sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm \
|
||||||
|
; sudo libguestfs-test-tool \
|
||||||
|
; sudo rm -rf /var/tmp/.guestfs-* \
|
||||||
|
; fi
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
# These are hardcoded serials for non-iMessage related research
|
||||||
|
# Overwritten by using GENERATE_UNIQUE=true
|
||||||
|
# Upstream removed nopicker, so we are adding it back in, at build time
|
||||||
|
# Once again, this is just for the Docker build so there is a default nopicker image there
|
||||||
|
|
||||||
|
ARG STOCK_DEVICE_MODEL=iMacPro1,1
|
||||||
|
ARG STOCK_SERIAL=C02TM2ZBHX87
|
||||||
|
ARG STOCK_BOARD_SERIAL=C02717306J9JG361M
|
||||||
|
ARG STOCK_UUID=007076A6-F2A2-4461-BBE5-BAD019F8025A
|
||||||
|
ARG STOCK_MAC_ADDRESS=00:0A:27:00:00:00
|
||||||
|
ARG STOCK_WIDTH=1920
|
||||||
|
ARG STOCK_HEIGHT=1080
|
||||||
|
ARG STOCK_MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist
|
||||||
|
ARG STOCK_MASTER_PLIST_URL_NOPICKER=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-nopicker-custom.plist
|
||||||
|
ARG STOCK_BOOTDISK=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2
|
||||||
|
ARG STOCK_BOOTDISK_NOPICKER=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2
|
||||||
|
|
||||||
|
RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
|
||||||
|
--master-plist-url="${STOCK_MASTER_PLIST_URL}" \
|
||||||
|
--model "${STOCK_DEVICE_MODEL}" \
|
||||||
|
--serial "${STOCK_SERIAL}" \
|
||||||
|
--board-serial "${STOCK_BOARD_SERIAL}" \
|
||||||
|
--uuid "${STOCK_UUID}" \
|
||||||
|
--mac-address "${STOCK_MAC_ADDRESS}" \
|
||||||
|
--width "${STOCK_WIDTH}" \
|
||||||
|
--height "${STOCK_HEIGHT}" \
|
||||||
|
--output-bootdisk "${STOCK_BOOTDISK}"
|
||||||
|
|
||||||
|
RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \
|
||||||
|
--master-plist-url="${STOCK_MASTER_PLIST_URL_NOPICKER}" \
|
||||||
|
--model "${STOCK_DEVICE_MODEL}" \
|
||||||
|
--serial "${STOCK_SERIAL}" \
|
||||||
|
--board-serial "${STOCK_BOARD_SERIAL}" \
|
||||||
|
--uuid "${STOCK_UUID}" \
|
||||||
|
--mac-address "${STOCK_MAC_ADDRESS}" \
|
||||||
|
--width "${STOCK_WIDTH}" \
|
||||||
|
--height "${STOCK_HEIGHT}" \
|
||||||
|
--output-bootdisk "${STOCK_BOOTDISK_NOPICKER}"
|
||||||
|
|
||||||
|
### symlink the old directory as upstream has renamed a directory. Symlinking purely for backwards compatability!
|
||||||
|
RUN ln -s /home/arch/OSX-KVM/Opencore /home/arch/OSX-KVM/Opencore-Catalina || true
|
||||||
|
####
|
||||||
|
|
||||||
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
||||||
|
|
||||||
# env -e ADDITIONAL_PORTS with a comma
|
# env -e ADDITIONAL_PORTS with a comma
|
||||||
# for example, -e ADDITIONAL_PORTS=hostfwd=tcp::23-:23,
|
# for example, -e ADDITIONAL_PORTS=hostfwd=tcp::23-:23,
|
||||||
ENV ADDITIONAL_PORTS=
|
ENV ADDITIONAL_PORTS=
|
||||||
@ -309,16 +354,16 @@ VOLUME ["/tmp/.X11-unix"]
|
|||||||
# /bootdisk is a useful persistent place to store the 15Mb serial number bootdisk.
|
# /bootdisk is a useful persistent place to store the 15Mb serial number bootdisk.
|
||||||
|
|
||||||
# if you don't set any of the above:
|
# if you don't set any of the above:
|
||||||
# the default serial numbers are already contained in ./OpenCore-Catalina/OpenCore.qcow2
|
# the default serial numbers are already contained in ./OpenCore/OpenCore.qcow2
|
||||||
# And the default serial numbers
|
# And the default serial numbers
|
||||||
|
|
||||||
CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
CMD 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}" 2>/dev/null || true \
|
; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
||||||
; [[ "${NOPICKER}" == true ]] && { \
|
; [[ "${NOPICKER}" == true ]] && { \
|
||||||
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
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/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
||||||
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
||||||
--master-plist-url="${MASTER_PLIST_URL}" \
|
--master-plist-url="${MASTER_PLIST_URL}" \
|
||||||
@ -327,7 +372,7 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
--bootdisks \
|
--bootdisks \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
--output-env "${ENV:=/env}" \
|
--output-env "${ENV:=/env}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
||||||
@ -341,7 +386,7 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
--mac-address "${MAC_ADDRESS}" \
|
--mac-address "${MAC_ADDRESS}" \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
||||||
|
|
||||||
|
@ -92,19 +92,29 @@ USER arch
|
|||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
# 5.13 problem
|
|
||||||
|
#### libguestfs versioning
|
||||||
|
|
||||||
|
# 5.13+ problem resolved by building the qcow2 against 5.12 using libguestfs-1.44.1-6
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
||||||
|
|
||||||
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
||||||
|
ENV KERNEL_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV LIBGUESTFS_PACKAGE_URL=https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-6-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
|
ARG LINUX=true
|
||||||
|
|
||||||
|
# required to use libguestfs inside a docker container, to create bootdisks for docker-osx on-the-fly
|
||||||
|
RUN if [[ "${LINUX}" == true ]]; then \
|
||||||
|
sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm \
|
||||||
|
; sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm \
|
||||||
|
; sudo libguestfs-test-tool \
|
||||||
|
; sudo rm -rf /var/tmp/.guestfs-* \
|
||||||
|
; fi
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
RUN sudo pacman -Rns linux --noconfirm \
|
|
||||||
; sudo pacman -Syy \
|
|
||||||
; sudo pacman -S mkinitcpio --noconfirm \
|
|
||||||
; sudo pacman -U https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst --noconfirm \
|
|
||||||
; sudo rm -rf /var/tmp/.guestfs-* \
|
|
||||||
; libguestfs-test-tool
|
|
||||||
|
|
||||||
WORKDIR /home/arch/OSX-KVM
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
@ -135,6 +145,14 @@ RUN if [[ "${COMPLETE}" ]]; then \
|
|||||||
&& wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \
|
&& wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \
|
||||||
; fi
|
; fi
|
||||||
|
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
# symlink the old directory, for redundancy
|
||||||
|
RUN ln -s /home/arch/OSX-KVM/Opencore /home/arch/OSX-KVM/Opencore-Catalina || true
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
||||||
|
|
||||||
ENV ADDITIONAL_PORTS=
|
ENV ADDITIONAL_PORTS=
|
||||||
@ -200,9 +218,9 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
; sudo chown -R $(id -u):$(id -g) /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}" 2>/dev/null || true \
|
||||||
; [[ "${NOPICKER}" == true ]] && { \
|
; [[ "${NOPICKER}" == true ]] && { \
|
||||||
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
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/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
||||||
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
||||||
--master-plist-url="${MASTER_PLIST_URL}" \
|
--master-plist-url="${MASTER_PLIST_URL}" \
|
||||||
@ -211,7 +229,7 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
--bootdisks \
|
--bootdisks \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
--output-env "${ENV:=/env}" \
|
--output-env "${ENV:=/env}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
||||||
@ -225,7 +243,7 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
--mac-address "${MAC_ADDRESS}" \
|
--mac-address "${MAC_ADDRESS}" \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; { [[ "${DISPLAY}" = ':99' ]] || [[ "${HEADLESS}" == true ]] ; } && { \
|
; { [[ "${DISPLAY}" = ':99' ]] || [[ "${HEADLESS}" == true ]] ; } && { \
|
||||||
nohup Xvfb :99 -screen 0 1920x1080x16 \
|
nohup Xvfb :99 -screen 0 1920x1080x16 \
|
||||||
|
@ -73,7 +73,7 @@ RUN touch Launch.sh \
|
|||||||
&& tee -a Launch.sh <<< '-smbios type=2 \' \
|
&& tee -a Launch.sh <<< '-smbios type=2 \' \
|
||||||
&& tee -a Launch.sh <<< '-audiodev ${AUDIO_DRIVER:-alsa},id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda \' \
|
&& tee -a Launch.sh <<< '-audiodev ${AUDIO_DRIVER:-alsa},id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda \' \
|
||||||
&& tee -a Launch.sh <<< '-device ich9-ahci,id=sata \' \
|
&& tee -a Launch.sh <<< '-device ich9-ahci,id=sata \' \
|
||||||
&& tee -a Launch.sh <<< '-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2} \' \
|
&& tee -a Launch.sh <<< '-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=${BOOTDISK:-/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2} \' \
|
||||||
&& tee -a Launch.sh <<< '-device ide-hd,bus=sata.2,drive=OpenCoreBoot \' \
|
&& tee -a Launch.sh <<< '-device ide-hd,bus=sata.2,drive=OpenCoreBoot \' \
|
||||||
&& tee -a Launch.sh <<< '-device ide-hd,bus=sata.3,drive=InstallMedia \' \
|
&& tee -a Launch.sh <<< '-device ide-hd,bus=sata.3,drive=InstallMedia \' \
|
||||||
&& tee -a Launch.sh <<< '-drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 \' \
|
&& tee -a Launch.sh <<< '-drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 \' \
|
||||||
@ -97,19 +97,33 @@ USER arch
|
|||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
# 5.13 problem
|
|
||||||
|
#### libguestfs versioning
|
||||||
|
|
||||||
|
# 5.13+ problem resolved by building the qcow2 against 5.12 using libguestfs-1.44.1-6
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
||||||
|
|
||||||
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
||||||
|
ENV KERNEL_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV LIBGUESTFS_PACKAGE_URL=https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-6-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
RUN sudo pacman -Rns linux --noconfirm \
|
ARG LINUX=true
|
||||||
; sudo pacman -Syy \
|
|
||||||
; sudo pacman -S mkinitcpio --noconfirm \
|
# required to use libguestfs inside a docker container, to create bootdisks for docker-osx on-the-fly
|
||||||
; sudo pacman -U https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst --noconfirm \
|
RUN if [[ "${LINUX}" == true ]]; then \
|
||||||
; sudo rm -rf /var/tmp/.guestfs-* \
|
sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm \
|
||||||
; libguestfs-test-tool
|
; sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm \
|
||||||
|
; sudo libguestfs-test-tool \
|
||||||
|
; sudo rm -rf /var/tmp/.guestfs-* \
|
||||||
|
; fi
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
# symlink the old directory, for redundancy
|
||||||
|
RUN ln -s /home/arch/OSX-KVM/Opencore /home/arch/OSX-KVM/Opencore-Catalina || true
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
||||||
|
|
||||||
@ -182,16 +196,16 @@ VOLUME ["/tmp/.X11-unix"]
|
|||||||
# /bootdisk is a useful persistent place to store the 15Mb serial number bootdisk.
|
# /bootdisk is a useful persistent place to store the 15Mb serial number bootdisk.
|
||||||
|
|
||||||
# if you don't set any of the above:
|
# if you don't set any of the above:
|
||||||
# the default serial numbers are already contained in ./OpenCore-Catalina/OpenCore.qcow2
|
# the default serial numbers are already contained in ./OpenCore/OpenCore.qcow2
|
||||||
# And the default serial numbers
|
# And the default serial numbers
|
||||||
|
|
||||||
CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
CMD 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}" 2>/dev/null || true \
|
; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
|
||||||
; [[ "${NOPICKER}" == true ]] && { \
|
; [[ "${NOPICKER}" == true ]] && { \
|
||||||
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
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/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
||||||
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
||||||
--master-plist-url="${MASTER_PLIST_URL}" \
|
--master-plist-url="${MASTER_PLIST_URL}" \
|
||||||
@ -200,7 +214,7 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
--bootdisks \
|
--bootdisks \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
--output-env "${ENV:=/env}" \
|
--output-env "${ENV:=/env}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
||||||
@ -214,7 +228,7 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
--mac-address "${MAC_ADDRESS}" \
|
--mac-address "${MAC_ADDRESS}" \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
||||||
|
|
||||||
|
@ -81,19 +81,29 @@ USER arch
|
|||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
# 5.13 problem
|
|
||||||
|
#### libguestfs versioning
|
||||||
|
|
||||||
|
# 5.13+ problem resolved by building the qcow2 against 5.12 using libguestfs-1.44.1-6
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
||||||
|
|
||||||
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
||||||
|
ENV KERNEL_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV LIBGUESTFS_PACKAGE_URL=https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-6-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
|
ARG LINUX=true
|
||||||
|
|
||||||
|
# required to use libguestfs inside a docker container, to create bootdisks for docker-osx on-the-fly
|
||||||
|
RUN if [[ "${LINUX}" == true ]]; then \
|
||||||
|
sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm \
|
||||||
|
; sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm \
|
||||||
|
; sudo libguestfs-test-tool \
|
||||||
|
; sudo rm -rf /var/tmp/.guestfs-* \
|
||||||
|
; fi
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
RUN sudo pacman -Rns linux --noconfirm \
|
|
||||||
; sudo pacman -Syy \
|
|
||||||
; sudo pacman -S mkinitcpio --noconfirm \
|
|
||||||
; sudo pacman -U https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst --noconfirm \
|
|
||||||
; sudo rm -rf /var/tmp/.guestfs-* \
|
|
||||||
; libguestfs-test-tool
|
|
||||||
|
|
||||||
WORKDIR /home/arch/OSX-KVM
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
@ -107,6 +117,13 @@ RUN mkdir -p ~/.ssh \
|
|||||||
&& tee -a ~/.ssh/config <<< ' StrictHostKeyChecking no' \
|
&& tee -a ~/.ssh/config <<< ' StrictHostKeyChecking no' \
|
||||||
&& tee -a ~/.ssh/config <<< ' UserKnownHostsFile=/dev/null'
|
&& tee -a ~/.ssh/config <<< ' UserKnownHostsFile=/dev/null'
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
# symlink the old directory, for redundancy
|
||||||
|
RUN ln -s /home/arch/OSX-KVM/Opencore /home/arch/OSX-KVM/Opencore-Catalina || true
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
||||||
|
|
||||||
ENV ADDITIONAL_PORTS=
|
ENV ADDITIONAL_PORTS=
|
||||||
@ -165,9 +182,9 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
; } \
|
; } \
|
||||||
; [[ "${NOPICKER}" == true ]] && { \
|
; [[ "${NOPICKER}" == true ]] && { \
|
||||||
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
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/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
||||||
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
||||||
--master-plist-url="${MASTER_PLIST_URL}" \
|
--master-plist-url="${MASTER_PLIST_URL}" \
|
||||||
@ -176,7 +193,7 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
--bootdisks \
|
--bootdisks \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
--output-env "${ENV:=/env}" \
|
--output-env "${ENV:=/env}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
||||||
@ -190,6 +207,6 @@ CMD sudo touch /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/n
|
|||||||
--mac-address "${MAC_ADDRESS}" \
|
--mac-address "${MAC_ADDRESS}" \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
; ./enable-ssh.sh && /bin/bash -c ./Launch.sh
|
||||||
|
@ -73,19 +73,28 @@ USER arch
|
|||||||
|
|
||||||
ENV USER arch
|
ENV USER arch
|
||||||
|
|
||||||
# 5.13 problem
|
#### libguestfs versioning
|
||||||
|
|
||||||
|
# 5.13+ problem resolved by building the qcow2 against 5.12 using libguestfs-1.44.1-6
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
ENV SUPERMIN_KERNEL=/boot/vmlinuz-linux
|
||||||
|
|
||||||
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
ENV SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
|
||||||
|
|
||||||
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
ENV SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
|
||||||
|
ENV KERNEL_PACKAGE_URL=https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
ENV LIBGUESTFS_PACKAGE_URL=https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-6-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
|
ARG LINUX=true
|
||||||
|
|
||||||
|
# required to use libguestfs inside a docker container, to create bootdisks for docker-osx on-the-fly
|
||||||
|
RUN if [[ "${LINUX}" == true ]]; then \
|
||||||
|
sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm \
|
||||||
|
; sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm \
|
||||||
|
; sudo libguestfs-test-tool \
|
||||||
|
; sudo rm -rf /var/tmp/.guestfs-* \
|
||||||
|
; fi
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
RUN sudo pacman -Rns linux --noconfirm \
|
|
||||||
; sudo pacman -Syy \
|
|
||||||
; sudo pacman -S mkinitcpio --noconfirm \
|
|
||||||
; sudo pacman -U https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst --noconfirm \
|
|
||||||
; sudo rm -rf /var/tmp/.guestfs-* \
|
|
||||||
; libguestfs-test-tool
|
|
||||||
|
|
||||||
WORKDIR /home/arch/OSX-KVM
|
WORKDIR /home/arch/OSX-KVM
|
||||||
|
|
||||||
@ -116,6 +125,13 @@ RUN if [[ "${COMPLETE}" ]]; then \
|
|||||||
&& wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \
|
&& wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \
|
||||||
; fi
|
; fi
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
# symlink the old directory, for redundancy
|
||||||
|
RUN ln -s /home/arch/OSX-KVM/Opencore /home/arch/OSX-KVM/Opencore-Catalina || true
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
#### SPECIAL RUNTIME ARGUMENTS BELOW
|
||||||
|
|
||||||
ENV ADDITIONAL_PORTS=
|
ENV ADDITIONAL_PORTS=
|
||||||
@ -181,9 +197,9 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
; sudo chown -R $(id -u):$(id -g) /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}" 2>/dev/null || true \
|
||||||
; [[ "${NOPICKER}" == true ]] && { \
|
; [[ "${NOPICKER}" == true ]] && { \
|
||||||
sed -i '/^.*InstallMedia.*/d' Launch.sh \
|
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/OpenCore-nopicker.qcow2}" \
|
||||||
; } \
|
; } \
|
||||||
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
|| export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
; [[ "${GENERATE_UNIQUE}" == true ]] && { \
|
||||||
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
./Docker-OSX/osx-serial-generator/generate-unique-machine-values.sh \
|
||||||
--master-plist-url="${MASTER_PLIST_URL}" \
|
--master-plist-url="${MASTER_PLIST_URL}" \
|
||||||
@ -192,7 +208,7 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
--bootdisks \
|
--bootdisks \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
--output-env "${ENV:=/env}" \
|
--output-env "${ENV:=/env}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
|
||||||
@ -206,7 +222,7 @@ CMD echo "${BOILERPLATE}" \
|
|||||||
--mac-address "${MAC_ADDRESS}" \
|
--mac-address "${MAC_ADDRESS}" \
|
||||||
--width "${WIDTH:-1920}" \
|
--width "${WIDTH:-1920}" \
|
||||||
--height "${HEIGHT:-1080}" \
|
--height "${HEIGHT:-1080}" \
|
||||||
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \
|
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
|
||||||
|| exit 1 ; } \
|
|| exit 1 ; } \
|
||||||
; { [[ "${DISPLAY}" = ':99' ]] || [[ "${HEADLESS}" == true ]] ; } && { \
|
; { [[ "${DISPLAY}" = ':99' ]] || [[ "${HEADLESS}" == true ]] ; } && { \
|
||||||
nohup Xvfb :99 -screen 0 1920x1080x16 \
|
nohup Xvfb :99 -screen 0 1920x1080x16 \
|
||||||
|
22
README.md
22
README.md
@ -8,7 +8,12 @@ Run Mac OS X in Docker with near-native performance! X11 Forwarding! iMessage se
|
|||||||
|
|
||||||
The Discord is active on #docker-osx and anyone is welcome to come and ask questions, ideas, etc.
|
The Discord is active on #docker-osx and anyone is welcome to come and ask questions, ideas, etc.
|
||||||
|
|
||||||
[](https://discord.gg/mx8pPw39Yg)
|
<p align="center">
|
||||||
|
<a href="https://hub.docker.com/r/sickcodes/docker-osx"><img src="https://dockeri.co/image/sickcodes/docker-osx"/></a><a href="https://discord.gg/mx8pPw39Yg"><a href="https://discord.gg/mx8pPw39Yg" target="_blank"><img src="https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/discord-logo.svg"></a></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Click to join the Discord server [https://discord.gg/mx8pPw39Yg](https://discord.gg/mx8pPw39Yg)
|
### Click to join the Discord server [https://discord.gg/mx8pPw39Yg](https://discord.gg/mx8pPw39Yg)
|
||||||
|
|
||||||
@ -34,10 +39,14 @@ Extra special thanks to the OpenCore team over at: https://github.com/acidanther
|
|||||||
|
|
||||||
If you like this project, consider contributing here or upstream!
|
If you like this project, consider contributing here or upstream!
|
||||||
|
|
||||||
<a href="https://hub.docker.com/r/sickcodes/docker-osx"><img src="https://dockeri.co/image/sickcodes/docker-osx"/></a>
|
|
||||||
|
|
||||||
## Quick Start Docker-OSX
|
## Quick Start Docker-OSX
|
||||||
|
|
||||||
|
Video setup tutorial is also available here: https://www.youtube.com/watch?v=wLezYl77Ll8
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://www.youtube.com/watch?v=wLezYl77Ll8" target="_blank"><img src="https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/Youtube-Screenshot-Docker-OSX-Setup.png"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
First time here? try [initial setup](#initial-setup), otherwise try the instructions below to use either Catalina or Big Sur.
|
First time here? try [initial setup](#initial-setup), otherwise try the instructions below to use either Catalina or Big Sur.
|
||||||
|
|
||||||
## Any questions, ideas, or just want to hang out?
|
## Any questions, ideas, or just want to hang out?
|
||||||
@ -1085,7 +1094,9 @@ Or tell the container to use specific ones using `-e GENERATE_SPECIFIC=true`
|
|||||||
-e MAC_ADDRESS="A8:5C:2C:9A:46:2F" \
|
-e MAC_ADDRESS="A8:5C:2C:9A:46:2F" \
|
||||||
```
|
```
|
||||||
|
|
||||||
### I'd like to run Docker-OSX with WSL2 (Windows, Ubuntu)
|
### I'd like to run Docker-OSX on Windows
|
||||||
|
|
||||||
|
Running Docker-OSX on windows is possible just in WSL2 (Windows, Ubuntu).
|
||||||
|
|
||||||
Ensure KVM is enabled and `x11-apps` is installed.
|
Ensure KVM is enabled and `x11-apps` is installed.
|
||||||
|
|
||||||
@ -1401,9 +1412,6 @@ docker run -it \
|
|||||||
# Boots in a minute or two!
|
# Boots in a minute or two!
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
```bash
|
|
||||||
|
|
||||||
OR if you have an image already and just want to log in and execute arbitrary commands:
|
OR if you have an image already and just want to log in and execute arbitrary commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
BIN
Youtube-Screenshot-Docker-OSX-Setup.png
Normal file
BIN
Youtube-Screenshot-Docker-OSX-Setup.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 104 KiB |
Submodule osx-serial-generator updated: 769babcc58...f511145c6f
@ -215,6 +215,7 @@ docker-osx:latest () {
|
|||||||
|
|
||||||
docker-osx:naked () {
|
docker-osx:naked () {
|
||||||
docker build ${NO_CACHE} \
|
docker build ${NO_CACHE} \
|
||||||
|
--squash \
|
||||||
--build-arg RANKMIRRORS=true \
|
--build-arg RANKMIRRORS=true \
|
||||||
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
||||||
-f ./Dockerfile.naked \
|
-f ./Dockerfile.naked \
|
||||||
@ -225,6 +226,7 @@ docker-osx:naked () {
|
|||||||
|
|
||||||
docker-osx:naked-auto () {
|
docker-osx:naked-auto () {
|
||||||
docker build ${NO_CACHE} \
|
docker build ${NO_CACHE} \
|
||||||
|
--squash \
|
||||||
--build-arg RANKMIRRORS=true \
|
--build-arg RANKMIRRORS=true \
|
||||||
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
|
||||||
-f ./Dockerfile.naked-auto \
|
-f ./Dockerfile.naked-auto \
|
||||||
@ -272,6 +274,12 @@ docker-osx:auto-big-sur () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
reset_docker_hard () {
|
reset_docker_hard () {
|
||||||
|
|
||||||
|
tee /etc/docker/daemon.json <<'EOF'
|
||||||
|
{
|
||||||
|
"experimental": true
|
||||||
|
}
|
||||||
|
EOF
|
||||||
systemctl disable --now docker
|
systemctl disable --now docker
|
||||||
systemctl disable --now docker.socket
|
systemctl disable --now docker.socket
|
||||||
systemctl stop docker
|
systemctl stop docker
|
||||||
@ -298,7 +306,7 @@ export DEBIAN_FRONTEND=noninteractive \
|
|||||||
; echo start_xvfb \
|
; echo start_xvfb \
|
||||||
; start_vnc \
|
; start_vnc \
|
||||||
; enable_kvm \
|
; enable_kvm \
|
||||||
; echo reset_docker_hard \
|
; reset_docker_hard \
|
||||||
; echo killall Xvfb \
|
; echo killall Xvfb \
|
||||||
; clone_repo "${BRANCH}" "${REPO}" \
|
; clone_repo "${BRANCH}" "${REPO}" \
|
||||||
; cd Docker-OSX \
|
; cd Docker-OSX \
|
||||||
|
Reference in New Issue
Block a user