Docker version 19.03
This allows you to not type sudo on the host when starting docker.
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
docker build -t gillwald-geometry .
docker run -it \
--hostname="gillwald-geometry" \
--user=$(id -u $USER):$(id -g $USER) \
--env="DISPLAY" \
--workdir="/home/$USER/geometry" \
--volume="$PWD:/home/$USER/geometry" \
--volume="/etc/group:/etc/group:ro" \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
gillwald-geometry:latest \
bash
user@gillwald-geometry:~/geometry$ cmake CMakeLists.txt
user@gillwald-geometry:~/geometry$ make
user@gillwald-geometry:~/geometry$ ./geometry_tests