ben
d1ac6380fa
ben/playonlinux-docker/pipeline/head This commit looks good
Details
|
||
---|---|---|
docs/img | ||
.gitignore | ||
Dockerfile | ||
Jenkinsfile | ||
LICENSE | ||
README.md | ||
build.sh | ||
push.sh | ||
steam.sh |
README.md
playonlinux-docker
A docker container for PlayOnLinux, using Ubuntu 22.04 as the base image.
Usage
First create a directory for the PlayOnLinux data:
$ mkdir ~/playonlinux
Pull and run the benediktkr/playonlinux
image from dockerhub:
$ docker run --rm -it \
--privileged \
--device /dev/dri/card0:/dev/dri/card0 \
-e DISPLAY=:0 \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v /dev/snd:/dev/snd:rw \
-v ~/playonlinux:/home/player:rw \
benediktkr/playonlinux:latest
If you want to run with a different UID and/or username, you can build the image.
3d hardware acceleration
Hardware accelertion is possible, but you may have to install the correct drivers in
the Dockerfile
(pull requests welcome). The Intel drivers are installed by default
in the Ubuntu image.
To pass your card to the container (as tested on an Intel card):
--device /dev/dri/card0:/dev/dri/card0
Modify as needed for other cards.
Build
To build with the default username player
and UID 1000
:
$ git clone https://git.sudo.is/ben/playonlinux-docker
$ docker build -t playonlinux .
If you need or want to use a different UID or username:
$ docker build --build-arg UID=1001 --build-arg USER_NAME=user -t playonlinux .
Running the container
Start PlayOnLinux:
$ mkdir ~/playonlinux
$ docker run --rm -it \
--privileged \
--device /dev/dri/card0:/dev/dri/card0 \
-e DISPLAY=:0 \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v /dev/snd:/dev/snd:rw \
-v ~/playonlinux:/home/player:rw \
playonlinux
Starting Steam:
$ docker run --rm -it \
--privileged \
--device /dev/dri/card0:/dev/dri/card0 \
-e DISPLAY=:0 \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v /dev/snd:/dev/snd:rw \
-v ~/playonlinux:/home/player:rw \
playonlinux --run Steam
The ENTRYPOINT
of the container is the playonlinux
binary, and any arguments you
pass are passed to it.
These examples pass --rm
to docker run
to avoid leaving lingering stopped containers,
so you should mount /home/player
to a directory to keep your installs and game saves.
Source
Git repo: git.sudo.is/ben/playonlinux-docker
GitHub: benediktkr/playonlinux-docker
Docker Hub: benediktkr/playonlinux