Unverified Commit 8bf8242a authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Add support for AMD CPU's (#21)

parent 6d25d2d1
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
FROM scratch
COPY --from=qemux/qemu-docker:5.10 / /
COPY --from=qemux/qemu-docker:5.11 / /

ARG VERSION_ARG="0.0"
ARG VERSION_OSX_KVM="326053dd61f49375d5dfb28ee715d38b04b5cd8e"
@@ -12,14 +12,7 @@ ARG DEBCONF_NONINTERACTIVE_SEEN="true"
RUN set -eu && \
    apt-get update && \
    apt-get --no-install-recommends -y install \
    uml-utilities \
    libguestfs-tools \
    p7zip-full \
    make \
    dmg2img \
    python3 \
    tesseract-ocr \
    tesseract-ocr-eng && \
    python3 && \
    apt-get clean && \
    echo "$VERSION_ARG" > /run/version && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -40,6 +33,6 @@ VOLUME /storage
ENV RAM_SIZE "3G"
ENV CPU_CORES "2"
ENV DISK_SIZE "32G"
ENV VERSION "ventura"
ENV VERSION "sonoma"

ENTRYPOINT ["/usr/bin/tini", "-s", "/run/entry.sh"]
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ services:
    image: dockurr/macos
    container_name: macos
    environment:
      VERSION: "ventura"
      VERSION: "sonoma"
    devices:
      - /dev/kvm
    cap_add:
+8 −8
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ services:
    image: dockurr/macos
    container_name: macos
    environment:
      VERSION: "ventura"
      VERSION: "sonoma"
    devices:
      - /dev/kvm
    cap_add:
@@ -83,21 +83,21 @@ kubectl apply -f kubernetes.yml

* ### How do I select the macOS version?

  By default, macOS 13 (Ventura) will be installed. But you can add the `VERSION` environment variable to your compose file, in order to specify an alternative macOS version to be downloaded:
  By default, macOS Sonoma will be installed. But you can add the `VERSION` environment variable to your compose file, in order to specify an alternative macOS version to be downloaded:

  ```yaml
  environment:
    VERSION: "ventura"
    VERSION: "sonoma"
  ```

  Select from the values below:
  
  |   **Value** | **Version**    |
  |----|-----|
  | `sonoma`    | macOS 14 (Sonoma)      |
  | `ventura`     | macOS 13 (Ventura)      |
  | `monterey` | macOS 12 (Monterey)    |
  | `big-sur`     | macOS 11 (Big Sur)        |
  | `sonoma`    | macOS Sonoma   |
  | `ventura`   | macOS Ventura  |
  | `monterey`  | macOS Monterey |
  | `big-sur`   | macOS Big Sur  |

* ### How do I change the storage location?

+13 −1
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ BOOT_DESC=""
BOOT_OPTS=""
BOOT_DRIVE_ID="OpenCoreBoot"
BOOT_DRIVE="/images/OpenCore.qcow2"

SECURE="off"
OVMF="/usr/share/OVMF"

@@ -48,6 +49,17 @@ BOOT_OPTS="$BOOT_OPTS -drive if=pflash,format=raw,file=$OVMF/$VARS"

# OpenCoreBoot
DISK_OPTS="$DISK_OPTS -device virtio-blk-pci,drive=${BOOT_DRIVE_ID},scsi=off,bus=pcie.0,addr=0x5,iothread=io2,bootindex=1"
DISK_OPTS="$DISK_OPTS -drive file=$BOOT_DRIVE,id=$BOOT_DRIVE_ID,format=qcow2,cache=$DISK_CACHE,aio=$DISK_IO,discard=$DISK_DISCARD,detect-zeroes=on,if=none"
DISK_OPTS="$DISK_OPTS -drive file=$BOOT_DRIVE,id=$BOOT_DRIVE_ID,format=qcow2,cache=$DISK_CACHE,aio=$DISK_IO,readonly=on,if=none"

CPU_VENDOR=$(lscpu | awk '/Vendor ID/{print $3}')
CPU_FLAGS="vendor=GenuineIntel,vmware-cpuid-freq=on,-pdpe1gb"

if [[ "$CPU_VENDOR" != "GenuineIntel" ]]; then
  CPU_MODEL="Haswell-noTSX"
fi
  
USB="nec-usb-xhci,id=xhci"
USB="$USB -device usb-kbd,bus=xhci.0"
USB="$USB -global nec-usb-xhci.msi=off"

return 0
+2 −3
Original line number Diff line number Diff line
#!/usr/bin/env bash
set -Eeuo pipefail

: "${VGA:="vmware"}"
: "${DISK_TYPE:="blk"}"
: "${USB:="qemu-xhci,id=xhci -device usb-kbd,bus=xhci.0"}"

APP="macOS"
VGA="vmware"
SUPPORT="https://github.com/dockur/osx/"
SUPPORT="https://github.com/dockur/macos"

cd /run

Loading