a jenkinsfile to build
ben/playonlinux-docker/pipeline/head This commit looks good Details

main
Ben Kristinsson 9 months ago
parent 00e8f6c971
commit 62f2deaba6

30
Jenkinsfile vendored

@ -0,0 +1,30 @@
pipeline {
agent any
triggers {
cron "H 23 * * *"
}
options {
timestamps()
ansiColor("xterm")
disableConcurrentBuilds()
}
stages {
stage('build') {
steps {
sh "./build.sh"
}
}
stage('push') {
steps {
sh "./push.sh"
}
}
}
post {
cleanup {
cleanWs(deleteDirs: true,
disableDeferredWipeout: true,
notFailBuild: true)
}
}
}

@ -1,12 +1,49 @@
# playonlinux-docker
a docker container with PlayOnLinux, base image is Ubuntu 22.04.
a docker container with [PlayOnLinux](https://www.playonlinux.com/en/), using Ubuntu 22.04 as the base image.
## usage
first create a directory for the PlayOnLinux data:
```shell
mkdir ~/playonlinux
```
pull and run the image from dockerhub:
```shell
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):
```shell
--device /dev/dri/card0:/dev/dri/card0
```
modify as needed for other cards
## build
with default `$USERNAME=player` and `$UID=1000`:
to build with the default username `player` and UID `1000`:
```shell
git clone https://git.sudo.is/ben/playonlinux-docker
docker build -t playonlinux .
```
@ -16,19 +53,17 @@ if you need or want to use a different UID or username:
docker build --build-arg UID=1001 --build-arg USERNAME=user -t playonlinux .
```
## run
## running the container
start PlayOnLinux:
```shell
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/ben:rw \
-v ~/playonlinux:/home/player:rw \
playonlinux
```
@ -40,7 +75,12 @@ docker run --rm -it --privileged \
-e DISPLAY=:0 \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v /dev/snd:/dev/snd:rw \
-v ~/playonlinux:/home/ben: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.

@ -0,0 +1,15 @@
#!/bin/sh
set -e
export IMAGE=playonlinux:latest
echo "pushing to dockerhub as benediktkr/${IMAGE}"
docker tag ${IMAGE} benediktkr/${IMAGE}
docker push benediktkr/${IMAGE}
echo
echo "pushing to git.sudo.is as ben/${IMAGE}"
docker tag ${IMAGE} git.sudo.is/ben/${IMAGE}
docker push git.sudo.is/ben/${IMAGE}
Loading…
Cancel
Save