Docker容器中运行macOS系统 性能接近原生
Docker-OSX项目实现在Docker容器中运行macOS系统。提供接近原生的性能,支持X11转发,可用于iMessage安全研究,实现iPhone USB功能。支持在Linux和Windows环境下进行macOS安全研究,兼容多个macOS版本。提供预装系统和自定义镜像,支持文件共享和iPhone USB穿透等功能。
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!
The Discord is active on #docker-osx and anyone is welcome to come and ask questions, ideas, etc.
<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/sickchat"><a href="https://discord.gg/sickchat" target="_blank"><img src="https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/discord-logo.svg"></a></a> </p>Or reach out via Linkedin if it's private: https://www.linkedin.com/in/sickcodes
Or via https://sick.codes/contact/
This 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!
Video setup tutorial is also available here: https://www.youtube.com/watch?v=wLezYl77Ll8
Windows users: click here to see the notes below!
<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, otherwise try the instructions below to use either Catalina or 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:latest # docker build -t docker-osx .
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 # docker build -t docker-osx --build-arg SHORTNAME=big-sur .
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 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 .
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 MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \ sickcodes/docker-osx:ventura # docker build -t docker-osx --build-arg SHORTNAME=ventura .
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 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' \ sickcodes/docker-osx:sonoma # docker build -t docker-osx --build-arg SHORTNAME=sonoma .
# 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
docker 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 .
docker 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 .
This 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
Enable SSH in network sharing inside the guest first. Change -e "USERNAME=user"
and -e "PASSWORD=password"
to your credentials. The container will add itself to ~/.ssh/authorized_keys
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.img:/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
The easiest and most secure way is sshfs
# 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
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
Video setup tutorial for usbfluxd is also available here: https://www.youtube.com/watch?v=kTk5fGjK_PM
<p align="center"> <a href="https://www.youtube.com/watch?v=kTk5fGjK_PM" target="_blank"><img alt="iPhone USB passthrough on macOS virtual machine Linux & Windows" src="https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/Youtube-USBFLUXD-Screenshot-Docker-OSX.png"></a> </p>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 usbmuxd
on port 5000
using https://github.com/corellium/usbfluxd to another system on the same network.
Ensure usbmuxd
, socat
and usbfluxd
are installed.
sudo pacman -S libusbmuxd usbmuxd avahi socat
Available on the AUR: https://aur.archlinux.org/packages/usbfluxd/
yay 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
This is done inside macOS.
Install homebrew.
172.17.0.1
is usually the Docker bridge IP, which is your PC, but you can use any IP from ip addr
...
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 172.17.0.1
to the IP address of the host. e.g. check ip addr
)
# 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
字节跳动发布的AI编程神器IDE
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。
全能AI智能助手,随时解答生活与工作的多样问题
问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。
实时语音翻译/同声传译工具
Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。
一键生成PPT和Word,让学习生活更轻松
讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。
深度推理能力全新升级,全面对标OpenAI o1
科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。
一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型
Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。
AI助力,做PPT更简单!
咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。