sickcodes / Docker-OSX

Run macOS VM in a Docker! Run near native OSX-KVM in Docker! X11 Forwarding! CI/CD for OS X Security Research! Docker mac Containers.
https://hub.docker.com/r/sickcodes/docker-osx
GNU General Public License v3.0
46.2k stars 2.47k forks source link

Update to add Sonoma #758

Closed sickcodes closed 5 months ago

sickcodes commented 6 months ago

Plist changes made to support Sonoma: https://github.com/sickcodes/osx-serial-generator/commit/908b3d687a200ca6691750fac967670d76f2a17b

docker build -t docker-osx-sonoma --build-arg BRANCH=sonoma --build-arg SHORTNAME=sonoma .

docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e GENERATE_UNIQUE=true \
    -e SMP=16 \
    -e CORES=16 \
    -e RAM=16 \
    -e CPU='Haswell-noTSX' \
    -e CPUID_FLAGS='kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on' \
    -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom-sonoma.plist' \
    docker-osx-sonoma

Note the branch: https://raw.githubusercontent.com/sickcodes/osx-serial-generator/sonoma-fix/config-custom-sonoma.plist

sickcodes commented 6 months ago

Issues so far include old Wireshark manuf file with tab separated

https://github.com/sickcodes/osx-serial-generator/blob/master/generate-unique-machine-values.sh#L223-L226

I should change from:

download_vendor_mac_addresses () {
    # download the MAC Address vendor list
    [ -e "${MAC_ADDRESSES_FILE:=vendor_macs.tsv}" ] || curl -L -o "${MAC_ADDRESSES_FILE}" https://gitlab.com/wireshark/wireshark/-/raw/release-3.6/manuf
}

To

download_vendor_mac_addresses () {
    # download the MAC Address vendor list
    [ -e "${MAC_ADDRESSES_FILE:=vendor_macs.tsv}" ] || curl -L -o "${MAC_ADDRESSES_FILE}" https://gitlab.com/wireshark/wireshark/-/raw/release-3.6/manuf
    # if 'Apple, Inc.' missing, download the new one'
    grep 'Apple, Inc.' "${MAC_ADDRESSES_FILE}" || curl -L -o "${MAC_ADDRESSES_FILE}" https://gitlab.com/wireshark/wireshark/-/raw/release-3.6/manuf
}

but fixed width https://github.com/sickcodes/osx-serial-generator/pull/30

Dario-Maselli commented 5 months ago

Hey @sickcodes - Running this gives this error:

Wrote TSV to: ./serial.tsv curl: (3) URL rejected: Port number was not a decimal number between 0 and 65535

Could you point me in the right direction to fix this? (Or is this still a WIP?)