#!/bin/bash xhost +local:docker docker run -it --rm --privileged --name TennisGame \ -e DISPLAY=$DISPLAY --net=host \ --volume="$HOME/.Xauthority:/root/.Xauthority:rw" \ -e PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native \ -v ${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native \ -v ~/.config/pulse/cookie:/root/.config/pulse/cookie \ -w /usr/src/TennisGame -v "$(pwd)":/usr/src/TennisGame maven:4.0.0-rc-5-eclipse-temurin-25-noble \ sh -c "apt update; DEBIAN_FRONTEND=noninteractive apt install libx11-6 xorg pulseaudio -y; mvn clean javafx:run; echo 'To start the game again, run \`mvn javafx:run\`. To exit the Docker container, type \`exit\`.'; bash"