mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2024-11-26 12:07:01 +08:00
remove need for privileged
This commit is contained in:
parent
96302c6f6d
commit
41dee4b321
@ -145,6 +145,8 @@ RUN touch Launch.sh \
|
|||||||
&& chmod +x ./Launch.sh \
|
&& chmod +x ./Launch.sh \
|
||||||
&& tee -a Launch.sh <<< '#!/bin/sh' \
|
&& tee -a Launch.sh <<< '#!/bin/sh' \
|
||||||
&& tee -a Launch.sh <<< 'set -eu' \
|
&& tee -a Launch.sh <<< 'set -eu' \
|
||||||
|
&& tee -a Launch.sh <<< 'sudo chown $(id -u):$(id -g) /dev/kvm 2>/dev/null || true' \
|
||||||
|
&& tee -a Launch.sh <<< 'sudo chown -R $(id -u):$(id -g) /dev/snd 2>/dev/null || true' \
|
||||||
&& tee -a Launch.sh <<< 'exec qemu-system-x86_64 -m ${RAM:-8}000 \' \
|
&& tee -a Launch.sh <<< 'exec qemu-system-x86_64 -m ${RAM:-8}000 \' \
|
||||||
&& tee -a Launch.sh <<< '-cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check \' \
|
&& tee -a Launch.sh <<< '-cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check \' \
|
||||||
&& tee -a Launch.sh <<< '-machine q35,accel=kvm:tcg \' \
|
&& tee -a Launch.sh <<< '-machine q35,accel=kvm:tcg \' \
|
||||||
|
16
README.md
16
README.md
@ -32,7 +32,7 @@ Pull requests, suggestions very welcome!
|
|||||||
|
|
||||||
docker pull sickcodes/docker-osx
|
docker pull sickcodes/docker-osx
|
||||||
|
|
||||||
docker run --privileged -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx
|
docker run --device /dev/kvm --device /dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx
|
||||||
|
|
||||||
# press ctrl G if your mouse gets stuck
|
# press ctrl G if your mouse gets stuck
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ docker run --privileged -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx
|
|||||||
|
|
||||||
# need more RAM and SSH on 0.0.0.0:50922?
|
# need more RAM and SSH on 0.0.0.0:50922?
|
||||||
|
|
||||||
docker run -e RAM=4 -p 50922:10022 --privileged -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx:latest
|
docker run --device /dev/kvm --device /dev/snd -e RAM=4 -p 50922:10022 sickcodes/docker-osx:latest
|
||||||
|
|
||||||
ssh fullname@localhost -p 50922
|
ssh fullname@localhost -p 50922
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ docker ps --all #make note of your container id
|
|||||||
docker commit containerID newImageName
|
docker commit containerID newImageName
|
||||||
|
|
||||||
# To run this image do the following
|
# To run this image do the following
|
||||||
docker run --privileged -v /tmp/.X11-unix:/tmp/.X11-unix newImageName
|
docker run --device /dev/kvm --device /dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix newImageName
|
||||||
```
|
```
|
||||||
|
|
||||||
# Troubleshooting
|
# Troubleshooting
|
||||||
@ -130,7 +130,7 @@ sudo yum install xorg-x11-server-utils
|
|||||||
# then run
|
# then run
|
||||||
xhost +
|
xhost +
|
||||||
|
|
||||||
docker run --privileged -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx ./OpenCore-Boot.sh
|
docker run --device /dev/kvm --device /dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx ./OpenCore-Boot.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternative run, thanks @roryrjb
|
Alternative run, thanks @roryrjb
|
||||||
@ -159,12 +159,6 @@ sudo dockerd
|
|||||||
sudo nohup dockerd &
|
sudo nohup dockerd &
|
||||||
```
|
```
|
||||||
|
|
||||||
Check /dev/kvm permissions
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo chmod 666 /dev/kvm
|
|
||||||
```
|
|
||||||
|
|
||||||
If you don't have Docker already
|
If you don't have Docker already
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -261,7 +255,7 @@ docker run \
|
|||||||
-e CORES=4 \
|
-e CORES=4 \
|
||||||
-e EXTRA='-usb -device usb-host,hostbus=1,hostaddr=8' \
|
-e EXTRA='-usb -device usb-host,hostbus=1,hostaddr=8' \
|
||||||
-e INTERNAL_SSH_PORT=23 \
|
-e INTERNAL_SSH_PORT=23 \
|
||||||
--privileged -v /tmp/.X11-unix:/tmp/.X11-unix docker-osx:latest
|
--device /dev/kvm --device /dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix docker-osx:latest
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user