A simple 🎮 to experiment with pygame & 🐋 & codecov and other tools.
Set up the env for docker.
# Run the Docker daemon
sudo systemctl start docker
# Create the docker group and add yourself - you'll need to re-login for this to take effect
sudo groupadd docker
sudo usermod -aG docker $USER
# Build dockerfile
docker build . -t pyghost-ubuntu:v1.0
# Clean build
docker build --no-cache . -t pyghost-ubuntu:v1.0
# Depending on the OS you are using sh or bash ..
docker run --rm -v `pwd`:/app -it pyghost-ubuntu:v1.0 sh
docker run --rm -v `pwd`:/app -it pyghost-ubuntu:v1.0 bash
# Linux setups - might need for host display access
# If needed for display env var: ip route list | grep default
xhost +local:docker
# For GUI apps, use the host's X11 server and DISPLAY
# https://stackoverflow.com/questions/28392949/running-chromium-inside-docker-gtk-cannot-open-display-0
docker run --rm --env DISPLAY=unix$DISPLAY -v $XAUTH:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -it pyghost-ubuntu:v1.0 bash
docker run --rm --env DISPLAY=unix$DISPLAY -v $XAUTH:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v `pwd`:/app -it pyghost-ubuntu:v1.0 bash
# docker exec -it pyghost-ubuntu:v1.0 bash
python run_game.py
The code is available under the Apache License.