Add Docker Compose

This commit is contained in:
TheBrokenRail 2020-09-25 12:58:37 -04:00
parent 074f904bcd
commit 82b9edcefc
4 changed files with 13 additions and 2 deletions

View File

@ -2,3 +2,4 @@
.gitignore .gitignore
Dockerfile Dockerfile
README.md README.md
docker-compose.yml

View File

@ -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
View 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
View File

@ -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}"