Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/issue.bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ body:
label: CPU architecture
options:
- x86-64
- arm64
validations:
required: true
- type: textarea
Expand Down
125 changes: 122 additions & 3 deletions .github/workflows/external_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,130 @@ jobs:
SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }}
run: |
printf "# External trigger for docker-dolphin\n\n" >> $GITHUB_STEP_SUMMARY
echo "Type is \`os\`" >> $GITHUB_STEP_SUMMARY
echo "No external release, exiting" >> $GITHUB_STEP_SUMMARY
exit 0
if grep -q "^dolphin_master_" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`dolphin_master_\`; will skip trigger if version matches." >> $GITHUB_STEP_SUMMARY
elif grep -q "^dolphin_master" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`dolphin_master\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
fi
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> External trigger running off of master branch. To disable this trigger, add \`dolphin_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE=$(curl -sL 'https://dolphin-emu.org/download/' | awk -F '(dolphin-|-x86_64.flatpak)' '/-x86_64.flatpak/ {print $3;exit}')
echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY
if grep -q "^dolphin_master_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
fi
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="Can't retrieve external version for dolphin branch master"
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-dolphin/actions/runs/${{ github.run_id }}"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 1
fi
EXT_RELEASE_SANITIZED=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
echo "Sanitized external version: \`${EXT_RELEASE_SANITIZED}\`" >> $GITHUB_STEP_SUMMARY
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
image="linuxserver/dolphin"
tag="latest"
token=$(curl -sX GET \
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fdolphin%3Apull" \
| jq -r '.token')
multidigest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Accept: application/vnd.oci.image.index.v1+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${tag}")
if jq -e '.layers // empty' <<< "${multidigest}" >/dev/null 2>&1; then
# If there's a layer element it's a single-arch manifest so just get that digest
digest=$(jq -r '.config.digest' <<< "${multidigest}")
else
# Otherwise it's multi-arch or has manifest annotations
if jq -e '.manifests[]?.annotations // empty' <<< "${multidigest}" >/dev/null 2>&1; then
# Check for manifest annotations and delete if found
multidigest=$(jq 'del(.manifests[] | select(.annotations))' <<< "${multidigest}")
fi
if [[ $(jq '.manifests | length' <<< "${multidigest}") -gt 1 ]]; then
# If there's still more than one digest, it's multi-arch
multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}")
else
# Otherwise it's single arch
multidigest=$(jq -r ".manifests[].digest?" <<< "${multidigest}")
fi
if digest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Accept: application/vnd.oci.image.manifest.v1+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${multidigest}"); then
digest=$(jq -r '.config.digest' <<< "${digest}");
fi
fi
image_info=$(curl -sL \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/blobs/${digest}")
if [[ $(echo $image_info | jq -r '.container_config') == "null" ]]; then
image_info=$(echo $image_info | jq -r '.config')
else
image_info=$(echo $image_info | jq -r '.container_config')
fi
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
if [ -z "${IMAGE_VERSION}" ]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "Can't retrieve last pushed version, exiting" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="Can't retrieve last pushed version for dolphin tag latest"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 1
fi
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then
echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
exit 0
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-dolphin/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
exit 0
else
if [[ "${artifacts_found}" == "false" ]]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> New version detected, but not all artifacts are published yet; skipping trigger" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="New version ${EXT_RELEASE} for dolphin tag latest is detected, however not all artifacts are uploaded to upstream release yet. Will try again later."
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
else
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
echo "New sanitized version \`${EXT_RELEASE_SANITIZED}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
if [[ "${artifacts_found}" == "true" ]]; then
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
fi
response=$(curl -iX POST \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-dolphin/job/master/buildWithParameters?PACKAGE_CHECK=false \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
sleep 10
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
buildurl="${buildurl%$'\r'}"
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
curl -iX POST \
"${buildurl}submitDescription" \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
--data-urlencode "Submit=Submit"
echo "**** Notifying Discord ****"
TRIGGER_REASON="A version change was detected for dolphin tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE_SANITIZED}"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
fi
fi
68 changes: 63 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-selkies:debiantrixie AS dolphin

ARG DOLPHIN_VERSION

RUN \
echo "**** install build deps ****" && \
apt-get update && \
apt-get install -y \
build-essential \
cmake \
git \
libavcodec-dev \
libavformat-dev \
libavutil-dev \
libcurl4-openssl-dev \
libegl1-mesa-dev \
libevdev-dev \
libpulse-dev \
libqt6svg6-dev \
libswscale-dev \
libudev-dev \
libvulkan-dev \
libx11-dev \
libxi-dev \
libxrandr-dev \
pkg-config \
qt6-base-dev \
qt6-base-private-dev \
qt6-wayland-dev \
qt6-wayland-private-dev

RUN \
echo "**** build dolphin ****" && \
if [ -z ${DOLPHIN_VERSION+x} ]; then \
DOLPHIN_VERSION=$(curl -sL 'https://dolphin-emu.org/download/' \
| awk -F '(dolphin-|-x86_64.flatpak)' '/-x86_64.flatpak/ {print $3;exit}'); \
fi && \
mkdir /root-out && \
git clone https://github.com/dolphin-emu/dolphin.git && \
cd dolphin && \
echo "**** building dolphin at ${DOLPHIN_VERSION} ****" && \
git checkout -f ${DOLPHIN_VERSION} && \
git submodule update --init --recursive && \
mkdir build && \
cd build && \
cmake .. && \
make -j16 && \
make install DESTDIR=/root-out

# runtime stage
FROM ghcr.io/linuxserver/baseimage-selkies:debiantrixie

# set version label
Expand All @@ -8,7 +57,6 @@ ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"

# title
ENV TITLE=Dolphin \
PIXELFLUX_WAYLAND=true

Expand All @@ -20,19 +68,29 @@ RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends \
dolphin-emu && \
libavcodec61 \
libavformat61 \
libqt6widgets6 \
libswscale8 \
qt6-svg-plugins \
qt6-wayland && \
echo "**** add symlink ****" && \
ln -s \
/usr/local/bin/dolphin-emu \
/usr/games/dolphin-emu && \
echo "**** cleanup ****" && \
printf \
"Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" \
> /build_version && \
apt-get autoclean && \
rm -rf \
/config/.cache \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*
/var/tmp/*

# add local files
# add local files and build stage
COPY --from=dolphin /root-out/ /
COPY /root /

# ports and volumes
Expand Down
41 changes: 0 additions & 41 deletions Dockerfile.aarch64

This file was deleted.

14 changes: 8 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline {
DEV_DOCKERHUB_IMAGE = 'lsiodev/dolphin'
PR_DOCKERHUB_IMAGE = 'lspipepr/dolphin'
DIST_IMAGE = 'ubuntu'
MULTIARCH = 'true'
MULTIARCH = 'false'
CI = 'true'
CI_WEB = 'true'
CI_PORT = '3001'
Expand Down Expand Up @@ -143,12 +143,14 @@ pipeline {
/* ########################
External Release Tagging
######################## */
// If this is an os release set release type to none to indicate no external release
stage("Set ENV os"){
// If this is a custom command to determine version use that command
stage("Set tag custom bash"){
steps{
script{
env.EXT_RELEASE = env.PACKAGE_TAG
env.RELEASE_LINK = 'none'
env.EXT_RELEASE = sh(
script: ''' curl -sL 'https://dolphin-emu.org/download/' | awk -F '(dolphin-|-x86_64.flatpak)' '/-x86_64.flatpak/ {print $3;exit}' ''',
returnStdout: true).trim()
env.RELEASE_LINK = 'custom_command'
}
}
}
Expand Down Expand Up @@ -1020,7 +1022,7 @@ pipeline {
"type": "commit",\
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
echo "Pushing New release for Tag"
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
jq -n \
--arg tag_name "$META_TAG" \
--arg target_commitish "master" \
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@ The architectures supported by this image are:
| Architecture | Available | Tag |
| :----: | :----: | ---- |
| x86-64 | ✅ | amd64-\<version tag\> |
| arm64 | ✅ | arm64v8-\<version tag\> |
| arm64 | ❌ | |

## Application Setup

The application can be accessed at:

* https://yourhost:3001/

**On container creation you may need to enter/exit controller configuration in order for gamepads to work**

### Strict reverse proxies

This image uses a self-signed certificate by default. This naturally means the scheme is `https`.
Expand Down Expand Up @@ -639,6 +641,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **06.05.26:** - Build dolphin from source, ingest latest versions, remove aarch64 support.
* **05.03.26:** - Make Wayland default disable with PIXELFLUX_WAYLAND=false.
* **20.12.25:** - Add Wayland init logic.
* **15.08.25:** - Rebase to Debian Trixie for updated Dolphin, update controller mapping.
Expand Down
5 changes: 3 additions & 2 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

# jenkins variables
project_name: docker-dolphin
external_type: os
external_type: na
custom_version_command: "curl -sL 'https://dolphin-emu.org/download/' | awk -F '(dolphin-|-x86_64.flatpak)' '/-x86_64.flatpak/ {print $3;exit}'"
release_type: stable
release_tag: latest
ls_branch: master
Expand All @@ -16,7 +17,7 @@ repo_vars:
- DEV_DOCKERHUB_IMAGE = 'lsiodev/dolphin'
- PR_DOCKERHUB_IMAGE = 'lspipepr/dolphin'
- DIST_IMAGE = 'ubuntu'
- MULTIARCH = 'true'
- MULTIARCH = 'false'
- CI = 'true'
- CI_WEB = 'true'
- CI_PORT = '3001'
Expand Down
4 changes: 3 additions & 1 deletion readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ project_categories: "Games"
# supported architectures
available_architectures:
- {arch: "{{ arch_x86_64 }}", tag: "latest"}
- {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
# development version
development_versions: false
# container parameters
Expand All @@ -35,6 +34,8 @@ app_setup_block: |
The application can be accessed at:

* https://yourhost:3001/

**On container creation you may need to enter/exit controller configuration in order for gamepads to work**
# init diagram
init_diagram: |
"dolphin:latest": {
Expand Down Expand Up @@ -107,6 +108,7 @@ init_diagram: |
"dolphin:latest" <- Base Images
# changelog
changelogs:
- {date: "06.05.26:", desc: "Build dolphin from source, ingest latest versions, remove aarch64 support."}
- {date: "05.03.26:", desc: "Make Wayland default disable with PIXELFLUX_WAYLAND=false."}
- {date: "20.12.25:", desc: "Add Wayland init logic."}
- {date: "15.08.25:", desc: "Rebase to Debian Trixie for updated Dolphin, update controller mapping."}
Expand Down
2 changes: 1 addition & 1 deletion root/defaults/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="MENU">
<item label="xterm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm"><action name="Execute"><command>/usr/bin/xterm</command></action></item>
<item label="Dolphin" icon="/usr/share/icons/hicolor/scalable/apps/dolphin-emu.svg"><action name="Execute"><command>sh -c "xterm -e /usr/games/dolphin-emu"</command></action></item>
<item label="Dolphin" icon="/usr/share/selkies/www/icon.png"><action name="Execute"><command>sh -c "xterm -e /usr/games/dolphin-emu"</command></action></item>
</menu>
</openbox_menu>
Loading