Files
docker-configs/linkwarden/data/archives/2/76_readability.json

1 line
17 KiB
JSON
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"title":"","byline":"dockur","dir":null,"lang":null,"content":"<div id=\"readability-page-1\" class=\"page\"><div data-hpc=\"true\"><article>\n<p dir=\"auto\">OSX (macOS) inside a Docker container.</p>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Features ✨</h2><a href=\"#features-\" aria-label=\"Permalink: Features ✨\" id=\"user-content-features-\"></a></p>\n<ul dir=\"auto\">\n<li>KVM acceleration</li>\n<li>Web-based viewer</li>\n<li>Automatic download</li>\n</ul>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Usage 🐳</h2><a href=\"#usage--\" aria-label=\"Permalink: Usage 🐳\" id=\"user-content-usage--\"></a></p>\n<p dir=\"auto\">Via Docker Compose:</p>\n<div dir=\"auto\"><pre><span>services</span>:\n <span>macos</span>:\n <span>image</span>: <span>dockurr/macos</span>\n <span>container_name</span>: <span>macos</span>\n <span>environment</span>:\n <span>VERSION</span>: <span><span>\"</span>13<span>\"</span></span>\n <span>devices</span>:\n - <span>/dev/kvm</span>\n <span>cap_add</span>:\n - <span>NET_ADMIN</span>\n <span>ports</span>:\n - <span>8006:8006</span>\n - <span>5900:5900/tcp</span>\n - <span>5900:5900/udp</span>\n <span>stop_grace_period</span>: <span>2m</span></pre></div>\n<p dir=\"auto\">Via Docker CLI:</p>\n<div dir=\"auto\"><pre>docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/macos</pre></div>\n<p dir=\"auto\">Via Kubernetes:</p>\n<div dir=\"auto\"><pre>kubectl apply -f https://raw.githubusercontent.com/dockur/macos/refs/heads/master/kubernetes.yml</pre></div>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Compatibility ⚙️</h2><a href=\"#compatibility-\" aria-label=\"Permalink: Compatibility ⚙️\" id=\"user-content-compatibility-\"></a></p>\n<table>\n<thead>\n<tr>\n<th><strong>Product</strong></th>\n<th><strong>Platform</strong></th>\n<th></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Docker Engine</td>\n<td>Linux</td>\n<td>✅</td>\n</tr>\n<tr>\n<td>Docker Desktop</td>\n<td>Linux</td>\n<td>❌</td>\n</tr>\n<tr>\n<td>Docker Desktop</td>\n<td>macOS</td>\n<td>❌</td>\n</tr>\n<tr>\n<td>Docker Desktop</td>\n<td>Windows 11</td>\n<td>✅</td>\n</tr>\n<tr>\n<td>Docker Desktop</td>\n<td>Windows 10</td>\n<td>❌</td>\n</tr>\n</tbody>\n</table>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">FAQ 💬</h2><a href=\"#faq-\" aria-label=\"Permalink: FAQ 💬\" id=\"user-content-faq-\"></a></p>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">How do I use it?</h3><a href=\"#how-do-i-use-it\" aria-label=\"Permalink: How do I use it?\" id=\"user-content-how-do-i-use-it\"></a></p>\n<p dir=\"auto\">Very simple! These are the steps:</p>\n<ul dir=\"auto\">\n<li>\n<p dir=\"auto\">Start the container and connect to <a rel=\"nofollow\" href=\"http://localhost:8006/\">port 8006</a> using your web browser.</p>\n</li>\n<li>\n<p dir=\"auto\">Choose <code>Disk Utility</code> and then select the largest <code>Apple Inc. VirtIO Block Media</code> disk.</p>\n</li>\n<li>\n<p dir=\"auto\">Click the <code>Erase</code> button to format the disk to APFS, and give it any recognizable name you like.</p>\n</li>\n<li>\n<p dir=\"auto\">Close the current window and proceed the installation by clicking <code>Reinstall macOS</code>.</p>\n</li>\n<li>\n<p dir=\"auto\">When prompted where you want to install it, select the disk you just created previously.</p>\n</li>\n<li>\n<p dir=\"auto\">After all files are copied, select your region, language, and account settings.</p>\n</li>\n</ul>\n<p dir=\"auto\">Enjoy your brand new machine, and don't forget to star this repo!</p>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">How do I select the macOS version?</h3><a href=\"#how-do-i-select-the-macos-version\" aria-label=\"Permalink: How do I select the macOS version?\" id=\"user-content-how-do-i-select-the-macos-version\"></a></p>\n<p dir=\"auto\">By default, macOS 13 (Ventura) will be installed, as it offers the best performance.</p>\n<p dir=\"auto\">But you can add the <code>VERSION</code> environment variable to your compose file, in order to specify an alternative macOS version to be downloaded:</p>\n<div dir=\"auto\"><pre><span>environment</span>:\n <span>VERSION</span>: <span><span>\"</span>13<span>\"</span></span></pre></div>\n<p dir=\"auto\">Select from the values below:</p>\n<table>\n<thead>\n<tr>\n<th><strong>Value</strong></th>\n<th><strong>Version</strong></th>\n<th><strong>Name</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>15</code></td>\n<td>macOS 15</td>\n<td>Sequoia</td>\n</tr>\n<tr>\n<td><code>14</code></td>\n<td>macOS 14</td>\n<td>Sonoma</td>\n</tr>\n<tr>\n<td><code>13</code></td>\n<td>macOS 13</td>\n<td>Ventura</td>\n</tr>\n<tr>\n<td><code>12</code></td>\n<td>macOS 12</td>\n<td>Monterey</td>\n</tr>\n<tr>\n<td><code>11</code></td>\n<td>macOS 11</td>\n<td>Big Sur</td>\n</tr>\n</tbody>\n</table>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">How do I change the storage location?</h3><a href=\"#how-do-i-change-the-storage-location\" aria-label=\"Permalink: How do I change the storage location?\" id=\"user-content-how-do-i-change-the-storage-location\"></a></p>\n<p dir=\"auto\">To change the storage location, include the following bind mount in your compose file:</p>\n<div dir=\"auto\"><pre><span>volumes</span>:\n - <span>/var/osx:/storage</span></pre></div>\n<p dir=\"auto\">Replace the example path <code>/var/osx</code> with the desired storage folder.</p>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">How do I change the size of the disk?</h3><a href=\"#how-do-i-change-the-size-of-the-disk\" aria-label=\"Permalink: How do I change the size of the disk?\" id=\"user-content-how-do-i-change-the-size-of-the-disk\"></a></p>\n<p dir=\"auto\">To expand the default size of 64 GB, add the <code>DISK_SIZE</code> setting to your compose file and set it to your preferred capacity:</p>\n<div dir=\"auto\"><pre><span>environment</span>:\n <span>DISK_SIZE</span>: <span><span>\"</span>256G<span>\"</span></span></pre></div>\n<div dir=\"auto\"><p dir=\"auto\">Tip</p><p dir=\"auto\">This can also be used to resize the existing disk to a larger capacity without any data loss.</p>\n</div>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">How do I change the amount of CPU or RAM?</h3><a href=\"#how-do-i-change-the-amount-of-cpu-or-ram\" aria-label=\"Permalink: How do I change the amount of CPU or RAM?\" id=\"user-content-how-do-i-change-the-amount-of-cpu-or-ram\"></a></p>\n<p dir=\"auto\">By default, the container will be allowed to use a maximum of 2 CPU cores and 4 GB of RAM.</p>\n<p dir=\"auto\">If you want to adjust this, you can specify the desired amount using the following environment variables:</p>\n<div dir=\"auto\"><pre><span>environment</span>:\n <span>RAM_SIZE</span>: <span><span>\"</span>8G<span>\"</span></span>\n <span>CPU_CORES</span>: <span><span>\"</span>4<span>\"</span></span></pre></div>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">How do I pass-through a USB device?</h3><a href=\"#how-do-i-pass-through-a-usb-device\" aria-label=\"Permalink: How do I pass-through a USB device?\" id=\"user-content-how-do-i-pass-through-a-usb-device\"></a></p>\n<p dir=\"auto\">To pass-through a USB device, first lookup its vendor and product id via the <code>lsusb</code> command, then add them to your compose file like this:</p>\n<div dir=\"auto\"><pre><span>environment</span>:\n <span>ARGUMENTS</span>: <span><span>\"</span>-device usb-host,vendorid=0x1234,productid=0x1234<span>\"</span></span>\n<span>devices</span>:\n - <span>/dev/bus/usb</span></pre></div>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">How do I verify if my system supports KVM?</h3><a href=\"#how-do-i-verify-if-my-system-supports-kvm\" aria-label=\"Permalink: How do I verify if my system supports KVM?\" id=\"user-content-how-do-i-verify-if-my-system-supports-kvm\"></a></p>\n<p dir=\"auto\">Only Linux and Windows 11 support KVM virtualization, macOS and Windows 10 do not unfortunately.</p>\n<p dir=\"auto\">You can run the following commands in Linux to check your system:</p>\n<div dir=\"auto\"><pre>sudo apt install cpu-checker\nsudo kvm-ok</pre></div>\n<p dir=\"auto\">If you receive an error from <code>kvm-ok</code> indicating that KVM cannot be used, please check whether:</p>\n<ul dir=\"auto\">\n<li>\n<p dir=\"auto\">the virtualization extensions (<code>Intel VT-x</code> or <code>AMD SVM</code>) are enabled in your BIOS.</p>\n</li>\n<li>\n<p dir=\"auto\">you enabled \"nested virtualization\" if you are running the container inside a virtual machine.</p>\n</li>\n<li>\n<p dir=\"auto\">you are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's.</p>\n</li>\n</ul>\n<p dir=\"auto\">If you do not receive any error from <code>kvm-ok</code> but the container still complains about KVM, please check whether:</p>\n<ul dir=\"auto\">\n<li>\n<p dir=\"auto\">you are not using \"Docker Desktop for Linux\" as it does not support KVM, instead make use of Docker Engine directly.</p>\n</li>\n<li>\n<p dir=\"auto\">it could help to add <code>privileged: true</code> to your compose file (or <code>sudo</code> to your <code>docker run</code> command), to rule out any permission issue.</p>\n</li>\n</ul>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">How do I run Windows in a container?</h3><a href=\"#how-do-i-run-windows-in-a-container\" aria-label=\"Permalink: How do I run Windows in a container?\" id=\"user-content-how-do-i-run-windows-in-a-container\"></a></p>\n<p dir=\"auto\">You can use <a href=\"https://github.com/dockur/windows\">dockur/windows</a> for that. It shares many of the same features, and even has completely automatic installation.</p>\n<p dir=\"auto\"><h3 dir=\"auto\" tabindex=\"-1\">Is this project legal?</h3><a href=\"#is-this-project-legal\" aria-label=\"Permalink: Is this project legal?\" id=\"user-content-is-this-project-legal\"></a></p>\n<p dir=\"auto\">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.</p>\n<p dir=\"auto\">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.</p>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Acknowledgements 🙏</h2><a href=\"#acknowledgements-\" aria-label=\"Permalink: Acknowledgements 🙏\" id=\"user-content-acknowledgements-\"></a></p>\n<p dir=\"auto\">Special thanks to <a href=\"https://github.com/seitenca\">seitenca</a>, this project would not exist without her invaluable work.</p>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Stars 🌟</h2><a href=\"#stars-\" aria-label=\"Permalink: Stars 🌟\" id=\"user-content-stars-\"></a></p>\n<p dir=\"auto\"><a rel=\"nofollow\" href=\"https://starchart.cc/dockur/macos\"><img data-canonical-src=\"https://starchart.cc/dockur/macos.svg?variant=adaptive\" alt=\"Stars\" src=\"https://camo.githubusercontent.com/6ac2409f5c239bccb9add898255d0e53970a1abf1657728fcc6dec4911e1b5f2/68747470733a2f2f7374617263686172742e63632f646f636b75722f6d61636f732e7376673f76617269616e743d6164617074697665\"></a></p>\n<p dir=\"auto\"><h2 dir=\"auto\" tabindex=\"-1\">Disclaimer ⚖️</h2><a href=\"#disclaimer-\" aria-label=\"Permalink: Disclaimer ⚖️\" id=\"user-content-disclaimer-\"></a></p>\n<p dir=\"auto\"><em>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.</em></p>\n</article></div></div>","textContent":"\nOSX (macOS) inside a Docker container.\nFeatures ✨\n\nKVM acceleration\nWeb-based viewer\nAutomatic download\n\nUsage 🐳\nVia Docker Compose:\nservices:\n macos:\n image: dockurr/macos\n container_name: macos\n environment:\n VERSION: \"13\"\n devices:\n - /dev/kvm\n cap_add:\n - NET_ADMIN\n ports:\n - 8006:8006\n - 5900:5900/tcp\n - 5900:5900/udp\n stop_grace_period: 2m\nVia Docker CLI:\ndocker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/macos\nVia Kubernetes:\nkubectl apply -f https://raw.githubusercontent.com/dockur/macos/refs/heads/master/kubernetes.yml\nCompatibility ⚙️\n\n\n\nProduct\nPlatform\n\n\n\n\n\nDocker Engine\nLinux\n✅\n\n\nDocker Desktop\nLinux\n❌\n\n\nDocker Desktop\nmacOS\n❌\n\n\nDocker Desktop\nWindows 11\n✅\n\n\nDocker Desktop\nWindows 10\n❌\n\n\n\nFAQ 💬\nHow do I use it?\nVery simple! These are the steps:\n\n\nStart the container and connect to port 8006 using your web browser.\n\n\nChoose Disk Utility and then select the largest Apple Inc. VirtIO Block Media disk.\n\n\nClick the Erase button to format the disk to APFS, and give it any recognizable name you like.\n\n\nClose the current window and proceed the installation by clicking Reinstall macOS.\n\n\nWhen prompted where you want to install it, select the disk you just created previously.\n\n\nAfter all files are copied, select your region, language, and account settings.\n\n\nEnjoy your brand new machine, and don't forget to star this repo!\nHow do I select the macOS version?\nBy default, macOS 13 (Ventura) will be installed, as it offers the best performance.\nBut you can add the VERSION environment variable to your compose file, in order to specify an alternative macOS version to be downloaded:\nenvironment:\n VERSION: \"13\"\nSelect from the values below:\n\n\n\nValue\nVersion\nName\n\n\n\n\n15\nmacOS 15\nSequoia\n\n\n14\nmacOS 14\nSonoma\n\n\n13\nmacOS 13\nVentura\n\n\n12\nmacOS 12\nMonterey\n\n\n11\nmacOS 11\nBig Sur\n\n\n\nHow do I change the storage location?\nTo change the storage location, include the following bind mount in your compose file:\nvolumes:\n - /var/osx:/storage\nReplace the example path /var/osx with the desired storage folder.\nHow do I change the size of the disk?\nTo expand the default size of 64 GB, add the DISK_SIZE setting to your compose file and set it to your preferred capacity:\nenvironment:\n DISK_SIZE: \"256G\"\nTipThis can also be used to resize the existing disk to a larger capacity without any data loss.\n\nHow do I change the amount of CPU or RAM?\nBy default, the container will be allowed to use a maximum of 2 CPU cores and 4 GB of RAM.\nIf you want to adjust this, you can specify the desired amount using the following environment variables:\nenvironment:\n RAM_SIZE: \"8G\"\n CPU_CORES: \"4\"\nHow do I pass-through a USB device?\nTo 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:\nenvironment:\n ARGUMENTS: \"-device usb-host,vendorid=0x1234,productid=0x1234\"\ndevices:\n - /dev/bus/usb\nHow do I verify if my system supports KVM?\nOnly Linux and Windows 11 support KVM virtualization, macOS and Windows 10 do not unfortunately.\nYou can run the following commands in Linux to check your system:\nsudo apt install cpu-checker\nsudo kvm-ok\nIf you receive an error from kvm-ok indicating that KVM cannot be used, please check whether:\n\n\nthe virtualization extensions (Intel VT-x or AMD SVM) are enabled in your BIOS.\n\n\nyou enabled \"nested virtualization\" if you are running the container inside a virtual machine.\n\n\nyou are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's.\n\n\nIf you do not receive any error from kvm-ok but the container still complains about KVM, please check whether:\n\n\nyou are not using \"Docker Desktop for Linux\" as it does not support KVM, instead make use of Docker Engine directly.\n\n\nit could help to add privileged: true to your compose file (or sudo to your docker run command), to rule out any permission issue.\n\n\nHow do I run Windows in a container?\nYou can use dockur/windows for that. It shares many of the same features, and even has completely automatic installation.\nIs this project legal?\nYes, 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.\nHowever, 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.\nAcknowledgements 🙏\nSpecial thanks to seitenca, this project would not exist without her invaluable work.\nStars 🌟\n\nDisclaimer ⚖️\nOnly 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.\n","length":5098,"excerpt":"OSX (macOS) inside a Docker container.","siteName":null}