This Dockerfile allows you to run Battle.net and play games with wine in an unprivileged container running in a standard Gnome desktop session.
$ docker build . -t docker-battlenet
Create once with:
$ docker create \
--name battlenet \
-v /tmp/.X11-unix/:/tmp/.X11-unix/ \
-v ${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native \
-e PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native \
-e DISPLAY=$DISPLAY \
--device /dev/dri \
-v /share:/share \
docker-battlenet
Then run it each time with:
$ docker start battlenet
Follow the instructions to setup mediated GPU passthrough (GVT-g) the pass those extra arguments to Docker create : -e MESA_LOADER_DRIVER_OVERRIDE=i965 --privileged --ipc=host
.