开源软件名称(OpenSource Name):sickcodes/Docker-OSX开源软件地址(OpenSource Url):https://github.com/sickcodes/Docker-OSX开源编程语言(OpenSource Language):Shell 50.9%开源软件介绍(OpenSource Introduction):Follow @sickcodes on TwitterDocker-OSX ·Run Mac OS X in Docker with near-native performance! X11 Forwarding! iMessage security research! iPhone USB working! macOS in a Docker container! Conduct Security Research on macOS using both Linux & Windows! Docker-OSX now has a Discord server & Telegram!The Discord is active on #docker-osx and anyone is welcome to come and ask questions, ideas, etc. https://discord.gg/sickchatClick to join the Discord serverhttps://t.me/sickcodeschatClick to join the Telegram serverOr reach out via Linkedin if it's private: https://www.linkedin.com/in/sickcodes Or via https://sick.codes/contact/ AuthorThis project is maintained by Sick.Codes. (Twitter) Additional credits can be found here: https://github.com/sickcodes/Docker-OSX/blob/master/CREDITS.md Additionally, comprehensive list of all contributors can be found here: https://github.com/sickcodes/Docker-OSX/graphs/contributors Big thanks to @kholia for maintaining the upstream project, which Docker-OSX is built on top of: OSX-KVM. Also special thanks to @thenickdude who maintains the valuable fork KVM-OpenCore, which was started by @Leoyzen! Extra special thanks to the OpenCore team over at: https://github.com/acidanthera/OpenCorePkg. Their well-maintained bootloader provides much of the great functionality that Docker-OSX users enjoy :) If you like this project, consider contributing here or upstream! Quick Start Docker-OSXVideo setup tutorial is also available here: https://www.youtube.com/watch?v=wLezYl77Ll8 Windows users: click here to see the notes below! First time here? try initial setup, otherwise try the instructions below to use either Catalina or Big Sur. Any questions, ideas, or just want to hang out?https://discord.gg/sickchatCatalinadocker run -it \
--device /dev/kvm \
-p 50922:10022 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e "DISPLAY=${DISPLAY:-:0.0}" \
sickcodes/docker-osx:latest
# docker build -t docker-osx . Big Surdocker 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
# docker build -t docker-osx --build-arg SHORTNAME=big-sur . Montereydocker 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 MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \
sickcodes/docker-osx:monterey
# docker build -t docker-osx --build-arg SHORTNAME=monterey . Run Catalina Pre-Installed# 40GB disk space required: 20GB original image 20GB your container.
docker pull sickcodes/docker-osx:auto
# boot directly into a real OS X shell with a visual display [NOT HEADLESS]
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 \
sickcodes/docker-osx:auto
# username is user
# passsword is alpine Older SystemsHigh Sierradocker run -it \
--device /dev/kvm \
-p 50922:10022 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e "DISPLAY=${DISPLAY:-:0.0}" \
sickcodes/docker-osx:high-sierra
# docker build -t docker-osx --build-arg SHORTNAME=high-sierra . Mojavedocker run -it \
--device /dev/kvm \
-p 50922:10022 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e "DISPLAY=${DISPLAY:-:0.0}" \
sickcodes/docker-osx:mojave
# docker build -t docker-osx --build-arg SHORTNAME=mojave . Download the image manually and use it in DockerThis is a particularly good way for downloading the container, in case Docker's CDN (or your connection) happens to be slow. wget https://images2.sick.codes/mac_hdd_ng_auto.img
docker run -it \
--device /dev/kvm \
-p 50922:10022 \
-v "${PWD}/mac_hdd_ng_auto.img:/image" \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e "DISPLAY=${DISPLAY:-:0.0}" \
-e GENERATE_UNIQUE=true \
-e MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/custom/config-nopicker-custom.plist \
sickcodes/docker-osx:naked Use your own image and manually and automatically log into a shellEnable SSH in network sharing inside the guest first. Change Since you can't see the screen, use the PLIST with nopicker, for example: # Catalina
# wget https://images2.sick.codes/mac_hdd_ng_auto.img
# Monterey
wget https://images.sick.codes/mac_hdd_ng_auto_monterey.img
docker run -it \
--device /dev/kvm \
-p 50922:10022 \
-v "${PWD}/mac_hdd_ng_auto_monterey:/image" \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e "DISPLAY=${DISPLAY:-:0.0}" \
-e "USERNAME=user" \
-e "PASSWORD=alpine" \
-e GENERATE_UNIQUE=true \
-e MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/custom/config-nopicker-custom.plist \
sickcodes/docker-osx:naked-auto Share directories, sharing files, shared folder, mount folderThe easiest and most secure way is # on Linux/Windows
mkdir ~/mnt/osx
sshfs user@localhost:/ -p 50922 ~/mnt/osx
# wait a few seconds, and ~/mnt/osx will have full rootfs mounted over ssh, and in userspace
# automated: sshpass -p <password> sshfs user@localhost:/ -p 50922 ~/mnt/osx (VFIO) iPhone USB passthrough (VFIO)If you have a laptop see the next usbfluxd section. If you have a desktop PC, you can use @Silfalion's instructions : https://github.com/Silfalion/Iphone_docker_osx_passthrough (USBFLUXD) iPhone USB -> Network style passthrough OSX-KVM Docker-OSXVideo setup tutorial for usbfluxd is also available here: https://www.youtube.com/watch?v=kTk5fGjK_PM This method WORKS on laptop, PC, anything! Thank you @nikias for usbfluxd via https://github.com/corellium! This is done inside Linux. Open 3 terminals on Linux Connecting your device over USB on Linux allows you to expose Ensure
Available on the AUR: https://aur.archlinux.org/packages/usbfluxd/
Plug in your iPhone or iPad. Terminal 1 sudo systemctl start usbmuxd
sudo avahi-daemon Terminal 2: # on host
sudo systemctl restart usbmuxd
sudo socat tcp-listen:5000,fork unix-connect:/var/run/usbmuxd Terminal 3: sudo usbfluxd -f -n Connect to a host running usbfluxdThis is done inside macOS. Install homebrew.
macOS Terminal: # on the guest
brew install make automake autoconf libtool pkg-config gcc libimobiledevice usbmuxd
git clone https://github.com/corellium/usbfluxd.git
cd usbfluxd
./autogen.sh
make
sudo make install Accept the USB over TCP connection, and appear as local: (you may need to change # on the guest
sudo launchctl start usbmuxd
export PATH=/usr/local/sbin:${PATH}
sudo usbfluxd -f -r 172.17.0.1:5000 Close apps such as Xcode and reopen them and your device should appear! If you need to start again on Linux, wipe the current usbfluxd, usbmuxd, and socat: sudo killall usbfluxd
sudo systemctl restart usbmuxd
sudo killall socat https://github.com/sickcodes/osx-optimizerMake container FASTER usingSEE commands in https://github.com/sickcodes/osx-optimizer!
Increase disk space by moving /var/lib/docker to external drive, block storage, NFS, or any other location conceivable.Move /var/lib/docker, following the tutorial below
Tutorial here: https://sick.codes/how-to-run-docker-from-block-storage/ Only follow the above tutorial if you are happy with wiping all your current Docker images/layers. Safe mode: Disable docker temporarily so you can move the Docker folder temporarily.
killall dockerd
systemctl disable --now docker
systemctl disable --now docker.socket
systemctl stop docker
systemctl stop docker.socket Now, that Docker daemon is off, move /var/lib/docker somewhere Then, symbolicly link /var/lib/docker somewhere: mv /var/lib/docker /run/media/user/some_drive/docker
ln -s /run/media/user/some_drive/docker /var/lib/docker
# now check if /var/lib/docker is working still
ls /var/lib/docker If you see folders, then it worked. You can restart Docker, or just reboot if you want to be sure. Important notices:2021-11-14 - Added High Sierra, Mojave Pick one of these while building, irrelevant when using docker pull:
Technical detailsThere currently multiple images, each with different use cases (explained below):
High Sierra: Mojave: Catalina: Big-Sur: Monterey make your own image: Pre-made Catalina system by Sick.Codes: username: Naked: Bring-your-own-image setup (use any of the above first): Naked Auto: same as above but with Capabilities
Requirements
TODO
DockerImages built on top of the contents of this repository are also available on Docker Hub for convenience: https://hub.docker.com/r/sickcodes/docker-osx A comprehensive list of the available Docker images and their intended purpose can be found in the Instructions. KubernetesDocker-OSX supports Kubernetes. Kubernetes Helm Chart & Documentation can be found under the helm directory. Thanks cephasara for contributing this major contribution. SupportSmall questions & issuesFeel free to open an issue, should you come across minor issues with running Docker-OSX or have any questions. Resolved issuesBefore you open an issue, however, please check the closed issues and confirm that you're using the latest version of this repository — your issues may have already been resolved! You might also see your answer in our questions and answers section below. Feature requests and updatesFollow @sickcodes! Professional supportFor more sophisticated endeavours, we offer the following support services:
In case you're interested, contact @sickcodes on Twitter or click here. License/ContributingDocker-OSX is licensed under the GPL v3+. Contributions are welcomed and immensely appreciated. You are in-fact permitted to use Docker-OSX as a tool to create proprietary software. Other cool Docker/QEMU based projects
|
请发表评论