Add Docker Compose
This commit is contained in:
parent
074f904bcd
commit
82b9edcefc
@ -2,3 +2,4 @@
|
|||||||
.gitignore
|
.gitignore
|
||||||
Dockerfile
|
Dockerfile
|
||||||
README.md
|
README.md
|
||||||
|
docker-compose.yml
|
||||||
|
@ -16,7 +16,7 @@ PID="$!"
|
|||||||
|
|
||||||
xhost local:root
|
xhost local:root
|
||||||
|
|
||||||
sudo docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.virgl_test:/tmp/.virgl_test -v ~/.minecraft-pi:/root/.minecraft -e DISPLAY=unix${DISPLAY} thebrokenrail/minecraft-pi
|
sudo docker run -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.virgl_test:/tmp/.virgl_test -v ~/.minecraft-pi:/root/.minecraft -e DISPLAY=unix${DISPLAY} thebrokenrail/minecraft-pi
|
||||||
|
|
||||||
kill "${PID}"
|
kill "${PID}"
|
||||||
```
|
```
|
||||||
|
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
minecraft-pi:
|
||||||
|
image: thebrokenrail/minecraft-pi
|
||||||
|
volumes:
|
||||||
|
- '/tmp/.X11-unix:/tmp/.X11-unix'
|
||||||
|
- '/tmp/.virgl_test:/tmp/.virgl_test'
|
||||||
|
- '~/.minecraft-pi:/root/.minecraft'
|
||||||
|
environment:
|
||||||
|
- 'DISPLAY=unix${DISPLAY}'
|
2
run.sh
2
run.sh
@ -7,6 +7,6 @@ PID="$!"
|
|||||||
|
|
||||||
xhost local:root
|
xhost local:root
|
||||||
|
|
||||||
sudo docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.virgl_test:/tmp/.virgl_test -v ~/.minecraft-pi:/root/.minecraft -e DISPLAY=unix${DISPLAY} thebrokenrail/minecraft-pi
|
sudo docker-compose up
|
||||||
|
|
||||||
kill "${PID}"
|
kill "${PID}"
|
||||||
|
Loading…
Reference in New Issue
Block a user