Skip to content

Commit

Permalink
Merge pull request sickcodes#171 from sickcodes/move-custom-to-submodule
Browse files Browse the repository at this point in the history
Move custom serial generator scripts to their own repo:
  • Loading branch information
sickcodes authored Mar 9, 2021
2 parents d32104a + 0bce4b0 commit e2bab5b
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 1,715 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "osx-serial-generator"]
path = osx-serial-generator
url = https://github.com/sickcodes/osx-serial-generator.git
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ RUN tee -a sshd_config <<< 'AllowTcpForwarding yes' \
USER arch

# download OSX-KVM
RUN git clone --depth 1 https://github.com/kholia/OSX-KVM.git /home/arch/OSX-KVM
RUN git clone --recurse-submodules --depth 1 https://github.com/kholia/OSX-KVM.git /home/arch/OSX-KVM

# enable ssh
# docker exec .... ./enable-ssh.sh
Expand Down Expand Up @@ -201,7 +201,7 @@ RUN if [[ "${LINUX}" == true ]]; then \
# optional --build-arg to change branches for testing
ARG BRANCH=master
ARG REPO='https://github.com/sickcodes/Docker-OSX.git'
RUN git clone --branch "${BRANCH}" "${REPO}"
RUN git clone --recurse-submodules --depth 1 --branch "${BRANCH}" "${REPO}"
# env -e ADDITIONAL_PORTS with a comma
# for example, -e ADDITIONAL_PORTS=hostfwd=tcp::23-:23,
Expand Down Expand Up @@ -302,7 +302,7 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS
; } \
|| 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 \
Expand All @@ -314,7 +314,7 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS
; } \
; [[ "${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}" \
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.auto
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand All @@ -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}" \
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.naked
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ARG SCROT
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 \
Expand Down Expand Up @@ -125,7 +125,7 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS
; } \
|| 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 \
Expand All @@ -137,7 +137,7 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS
; } \
; [[ "${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}" \
Expand Down
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,32 @@ Thank you to @cephasara for this major contribution.

#### Follow [@sickcodes on Twitter](https://twitter.com/sickcodes) for updates or feature requests!

# Basic Quick Start Docker-OSX

```bash

docker pull sickcodes/docker-osx:latest

# Catalina
docker run -it \
--device /dev/kvm \
-p 50922:10022 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e "DISPLAY=${DISPLAY:-:0.0}" \
sickcodes/docker-osx:latest

# Big Sur
docker run -it \
--device /dev/kvm \
-p 50922:10022 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e "DISPLAY=${DISPLAY:-:0.0}" \
sickcodes/docker-osx:big-sur

# Wait 2-3 minutes until you see the logo.

```

# How to use

### There are 3 images: **latest**, **auto** and **naked**.
Expand Down Expand Up @@ -80,32 +106,6 @@ Use `docker commit`, copy the ID, and then `docker start ID`
[Pull out the .img file](https://github.com/sickcodes/Docker-OSX#backup-the-disk-wheres-my-disk), and then use that [.img file with :naked](https://github.com/sickcodes/Docker-OSX#quick-start-own-image-naked-container-image)


# Basic Quick Start Docker-OSX

```bash

docker pull sickcodes/docker-osx:latest

# catalina
docker run -it \
--device /dev/kvm \
-p 50922:10022 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e "DISPLAY=${DISPLAY:-:0.0}" \
sickcodes/docker-osx:latest

# big sur
docker run -it \
--device /dev/kvm \
-p 50922:10022 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e "DISPLAY=${DISPLAY:-:0.0}" \
sickcodes/docker-osx:big-sur

# Wait 2-3 minutes until you see the logo.

```

# Quick Start Large Pre-Made Image

Current large image size: 17.5GB
Expand Down
1 change: 1 addition & 0 deletions custom
Loading

0 comments on commit e2bab5b

Please sign in to comment.