<h1 align="center">OSX<br />
<div align="center">
<a href="https://github.com/dockur/macos/"><img src="https://github.com/dockur/macos/raw/master/.github/logo.png" title="Logo" style="max-width:100%;" width="128" /></a>
</div>
<div align="center">
[![Build]][build_url]
[![Version]][tag_url]
[![Size]][tag_url]
[![Package]][pkg_url]
[![Pulls]][hub_url]
</div></h1>
OSX (macOS) inside a Docker container.
## Features â¨
- KVM acceleration
- Web-based viewer
- Automatic download
## Usage ð³
Via Docker Compose:
```yaml
services:
macos:
image: dockurr/macos
container_name: macos
environment:
VERSION: "13"
devices:
- /dev/kvm
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 5900:5900/tcp
- 5900:5900/udp
stop_grace_period: 2m
```
Via Docker CLI:
```bash
docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/macos
```
Via Kubernetes:
```shell
kubectl apply -f https://raw.githubusercontent.com/dockur/macos/refs/heads/master/kubernetes.yml
```
## Compatibility âï¸
| **Product** | **Platform** | |
|---|---|---|
| Docker Engine | Linux| â
|
| Docker Desktop | Linux | â |
| Docker Desktop | macOS | â |
| Docker Desktop | Windows 11 | â
|
| Docker Desktop | Windows 10 | â |
## FAQ ð¬
### How do I use it?
Very simple! These are the steps:
- Start the container and connect to [port 8006](http://localhost:8006) using your web browser.
- Choose `Disk Utility` and then select the largest `Apple Inc. VirtIO Block Media` disk.
- Click the `Erase` button to format the disk to APFS, and give it any recognizable name you like.
- Close the current window and proceed the installation by clicking `Reinstall macOS`.
- When prompted where you want to install it, select the disk you just created previously.
- After all files are copied, select your region, language, and account settings.
Enjoy your brand new machine, and don't forget to star this repo!
### How do I select the macOS version?
By default, macOS 13 (Ventura) will be installed, as it offers the best performance.
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: "13"
```
Select from the values below:
| **Value** | **Version** | **Name** |
|-------------|----------------|------------------|
| `15` | macOS 15 | Sequoia |
| `14` | macOS 14 | Sonoma |
| `13` | macOS 13 | Ventura |
| `12` | macOS 12 | Monterey |
| `11` | macOS 11 | Big Sur |
### How do I change the storage location?
To change the storage location, include the following bind mount in your compose file:
```yaml
volumes:
- /var/osx:/storage
```
Replace the example path `/var/osx` with the desired storage folder.
### How do I change the size of the disk?
To expand the default size of 64 GB, add the `DISK_SIZE` setting to your compose file and set it to your preferred capacity:
```yaml
environment:
DISK_SIZE: "256G"
```
> [!TIP]
> This can also be used to resize the existing disk to a larger capacity without any data loss.
### How do I change the amount of CPU or RAM?
By default, the container will be allowed to use a maximum of 2 CPU cores and 4 GB of RAM.
If you want to adjust this, you can specify the desired amount using the following environment variables:
```yaml
environment:
RAM_SIZE: "8G"
CPU_CORES: "4"
```
### How do I pass-through a USB device?
To pass-through a USB device, first lookup its vendor and product id via the `lsusb` command, then add them to your compose file like this:
```yaml
environment:
ARGUMENTS: "-device usb-host,vendorid=0x1234,productid=0x1234"
devices:
- /dev/bus/usb
```
### How do I verify if my system supports KVM?
Only Linux and Windows 11 support KVM virtualization, macOS and Windows 10 do not unfortunately.
You can run the following commands in Linux to check your system:
```bash
sudo apt install cpu-checker
sudo kvm-ok
```
If you receive an error from `kvm-ok` indicating that KVM cannot be used, please check whether:
- the virtualization extensions (`Intel VT-x` or `AMD SVM`) are enabled in your BIOS.
- you enabled "nested virtualization" if you are running the container inside a virtual machine.
- you are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's.
If you do not receive any error from `kvm-ok` but the container still complains about KVM, please check whether:
- you are not using "Docker Desktop for Linux" as it does not support KVM, instead make use of Docker Engine directly.
- it could help to add `privileged: true` to your compose file (or `sudo` to your `docker run` command), to rule out any permission issue.
### How do I run Windows in a container?
You can use [dockur/windows](https://github.com/dockur/windows) for that. It shares many of the same features, and even has completely automatic installation.
### Is this project legal?
Yes, this project contains only open-source code and does not distribute any copyrighted material. Neither does it try to circumvent any copyright protection measures. So under all applicable laws, this project will be considered legal.
However, by installing Apple's macOS, you must accept their end-user license agreement, which does not permit installation on non-official hardware. So only run this container on hardware sold by Apple, as any other use will be a violation of their terms and conditions.
## Acknowledgements ð
Special thanks to [seitenca](https://github.com/seitenca), this project would not exist without her invaluable work.
## Stars ð
[![Stars](https://starchart.cc/dockur/macos.svg?variant=adaptive)](https://starchart.cc/dockur/macos)
## Disclaimer âï¸
*Only run this container on Apple hardware, any other use is not permitted by their EULA. The product names, logos, brands, and other trademarks referred to within this project are the property of their respective trademark holders. This project is not affiliated, sponsored, or endorsed by Apple Inc.*
[build_url]: https://github.com/dockur/macos/
[hub_url]: https://hub.docker.com/r/dockurr/macos/
[tag_url]: https://hub.docker.com/r/dockurr/macos/tags
[pkg_url]: https://github.com/dockur/macos/pkgs/container/macos
[Build]: https://github.com/dockur/macos/actions/workflows/build.yml/badge.svg
[Size]: https://img.shields.io/docker/image-size/dockurr/macos/latest?color=066da5&label=size
[Pulls]: https://img.shields.io/docker/pulls/dockurr/macos.svg?style=flat&label=pulls&logo=docker
[Version]: https://img.shields.io/docker/v/dockurr/macos/latest?arch=amd64&sort=semver&color=066da5
[Package]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fipitio.github.io%2Fbackage%2Fdockur%2Fmacos%2Fmacos.json&query=%24.downloads&logo=github&style=flat&color=066da5&label=pulls
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
一个开源 Docker 容器,源码大部分有python 和shell 编写。旨在让用户在 Linux 和 Windows 11 上运行 macOS,目前支持 macOS 13 Ventura 及其他版本。 用户可以通过 Docker Compose 或 Docker CLI 轻松启动容器,并通过 Web 浏览器访问其界面,进行 macOS 的安装和配置。 项目支持 KVM 加速,允许用户在容器中使用虚拟化技术,并提供了多种环境变量选项,以便自定义内存、CPU核心数和存储大小等设置。
资源推荐
资源详情
资源评论
收起资源包目录
macos-master.zip (24个子文件)
macos-master
license.md 1KB
config.plist 42KB
.github
dependabot.yml 196B
renovate.json 137B
ISSUE_TEMPLATE
2-feature.yml 1KB
1-issue.yml 1KB
3-bug.yml 1KB
4-question.yml 1KB
config.yml 28B
logo.png 229KB
workflows
build.yml 3KB
test.yml 272B
check.yml 595B
hub.yml 597B
src
fetch.py 20KB
boot.sh 6KB
entry.sh 647B
install.sh 4KB
readme.md 7KB
kubernetes.yml 1KB
compose.yml 265B
Dockerfile 2KB
.gitignore 1B
.dockerignore 164B
共 24 条
- 1
资源评论
一叶知秋yyds
- 粉丝: 730
- 资源: 58
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 企业文化的三层结构.docx
- 企业文化概念的探讨.docx
- 企业文化就是一言一行.docx
- 企业文化与东西方文化传统.docx
- 基于java的网上教学辅助系统的设计与实现论文.doc
- Be Like a Goldfish, Don't Memorize! Mitigating Memorization in Generative LLMs
- 从《士兵突击》学管理之企业文化.doc
- 论企业文化和企业制度.doc
- 浅论人力资源管理与企业文化的关系.doc
- 王伟论企业文化.doc
- 传统文化与企业家精神.docx
- 陈亮:企业文化建设的核心是认同.docx
- 传承与发展——企业家与企业文化之辩证关系.docx
- 董明珠:用企业文化留住人.docx
- 李东生首谈企业文化 TCL管理方式正在变革.docx
- 蒋锡培:社会公益需要构建慈善的企业文化.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功