Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebase to debian bookworm and ingest official appimage #47

Merged
merged 2 commits into from
Nov 25, 2024
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
9 changes: 2 additions & 7 deletions .github/workflows/external_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> External trigger running off of master branch. To disable this trigger, add \`digikam_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 -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/linuxserver/docker-baseimage-kasmvnc/releases | jq -r 'first(.[] | select(.tag_name | startswith("arch-"))) | .tag_name' | sed 's|arch-||' | sed 's|-ls.*||')
EXT_RELEASE=$(curl -sL https://mirrors.mit.edu/kde/stable/digikam/ | awk -F'(="|/")' '/href="[0-9]/ {print $2}')
echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
Expand All @@ -43,15 +43,10 @@ jobs:
token=$(curl -sX GET \
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fdigikam%3Apull" \
| jq -r '.token')
multidigest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${tag}" \
| jq -r 'first(.manifests[].digest)')
digest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
"https://ghcr.io/v2/${image}/manifests/${tag}" \
| jq -r '.config.digest')
image_info=$(curl -sL \
--header "Authorization: Bearer ${token}" \
Expand Down
47 changes: 33 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-kasmvnc:arch
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm

# set version label
ARG BUILD_DATE
Expand All @@ -16,23 +16,42 @@ RUN \
/kclient/public/icon.png \
https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/digikam-logo.png && \
echo "**** install runtime packages ****" && \
pacman -Sy --noconfirm --needed \
breeze-icons \
digikam \
firefox \
mariadb \
apt-get update && \
apt-get install -y --no-install-recommends \
breeze-icon-theme \
chromium \
mariadb-server \
openexr \
perl-image-exiftool && \
echo "**** image tweaks ****" && \
libimage-exiftool-perl && \
echo "**** install from appimage ****" && \
if [ -z ${DIGIKAM_VERSION+x} ]; then \
DIGIKAM_VERSION=$(curl -sL https://mirrors.mit.edu/kde/stable/digikam/ \
| awk -F'(="|/")' '/href="[0-9]/ {print $2}'); \
fi && \
curl -o \
/tmp/digi.app -L \
"https://mirrors.mit.edu/kde/stable/digikam/${DIGIKAM_VERSION}/digiKam-${DIGIKAM_VERSION}-Qt6-x86-64.appimage" && \
cd /tmp && \
chmod +x digi.app && \
./digi.app --appimage-extract && \
mv squashfs-root /opt/digikam && \
echo "**** OS Tweaks ****" && \
mv \
/usr/bin/chromium \
/usr/bin/chromium-real && \
echo '#!/bin/bash' > /usr/sbin/digikam && \
echo 'cd /opt/digikam && ./AppRun' >> /usr/sbin/digikam && \
chmod +x /usr/sbin/digikam && \
ln -s \
/usr/bin/vendor_perl/exiftool \
/usr/bin/exiftool && \
dbus-uuidgen > /etc/machine-id && \
/usr/bin/chromium \
/usr/bin/firefox && \
echo "**** cleanup ****" && \
apt-get autoclean && \
rm -rf \
/tmp/* \
/var/cache/pacman/pkg/* \
/var/lib/pacman/sync/*
/config/.cache \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*

# add local files
COPY /root /
Expand Down
41 changes: 0 additions & 41 deletions Dockerfile.aarch64

This file was deleted.

6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pipeline {
DOCKERHUB_IMAGE = 'linuxserver/digikam'
DEV_DOCKERHUB_IMAGE = 'lsiodev/digikam'
PR_DOCKERHUB_IMAGE = 'lspipepr/digikam'
DIST_IMAGE = 'arch'
MULTIARCH = 'true'
DIST_IMAGE = 'ubuntu'
MULTIARCH = 'false'
CI = 'true'
CI_WEB = 'true'
CI_PORT = '3000'
Expand Down Expand Up @@ -131,7 +131,7 @@ pipeline {
steps{
script{
env.EXT_RELEASE = sh(
script: ''' curl -sX GET https://api.github.com/repos/linuxserver/docker-baseimage-kasmvnc/releases | jq -r 'first(.[] | select(.tag_name | startswith("arch-"))) | .tag_name' | sed 's|arch-||' | sed 's|-ls.*||' ''',
script: ''' curl -sL https://mirrors.mit.edu/kde/stable/digikam/ | awk -F'(="|/")' '/href="[0-9]/ {print $2}' ''',
returnStdout: true).trim()
env.RELEASE_LINK = 'custom_command'
}
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The architectures supported by this image are:
| Architecture | Available | Tag |
| :----: | :----: | ---- |
| x86-64 | ✅ | amd64-\<version tag\> |
| arm64 | ✅ | arm64v8-\<version tag\> |
| arm64 | ❌ | |
| armhf | ❌ | |

## Application Setup
Expand Down Expand Up @@ -115,7 +115,7 @@ To install cjk fonts on startup as an example pass the environment variables (Al

```
-e DOCKER_MODS=linuxserver/mods:universal-package-install
-e INSTALL_PACKAGES=noto-fonts-cjk
-e INSTALL_PACKAGES=fonts-noto-cjk
-e LC_ALL=zh_CN.UTF-8
```

Expand Down Expand Up @@ -411,6 +411,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **25.11.24:** - Rebase to Debian using official appimage, drop aarch64 support.
* **10.02.24:** - Update Readme with new env vars and ingest proper PWA icon.
* **05.09.23:** - Add openexr dependency.
* **18.03.23:** - Rebase to KasmVNC base image.
Expand Down
6 changes: 3 additions & 3 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# jenkins variables
project_name: docker-digikam
external_type: na
custom_version_command: "curl -sX GET https://api.github.com/repos/linuxserver/docker-baseimage-kasmvnc/releases | jq -r 'first(.[] | select(.tag_name | startswith(\"arch-\"))) | .tag_name' | sed 's|arch-||' | sed 's|-ls.*||'"
custom_version_command: "curl -sL https://mirrors.mit.edu/kde/stable/digikam/ | awk -F'(=\"|/\")' '/href=\"[0-9]/ {print $2}'"
release_type: stable
release_tag: latest
ls_branch: master
Expand All @@ -16,8 +16,8 @@ repo_vars:
- DOCKERHUB_IMAGE = 'linuxserver/digikam'
- DEV_DOCKERHUB_IMAGE = 'lsiodev/digikam'
- PR_DOCKERHUB_IMAGE = 'lspipepr/digikam'
- DIST_IMAGE = 'arch'
- MULTIARCH = 'true'
- DIST_IMAGE = 'ubuntu'
- MULTIARCH = 'false'
- CI = 'true'
- CI_WEB = 'true'
- CI_PORT = '3000'
Expand Down
4 changes: 2 additions & 2 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ project_blurb_optional_extras_enabled: false
# supported architectures
available_architectures:
- { arch: "{{ arch_x86_64 }}", tag: "latest"}
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}

# development version
development_versions: false
Expand Down Expand Up @@ -41,7 +40,7 @@ kasm_blurb: true
show_nvidia: true
external_http_port: "3000"
external_https_port: "3001"
noto_fonts: "noto-fonts-cjk"
noto_fonts: "fonts-noto-cjk"

# application setup block
app_setup_block_enabled: true
Expand All @@ -57,6 +56,7 @@ app_setup_block: |

# changelog
changelogs:
- { date: "25.11.24:", desc: "Rebase to Debian using official appimage, drop aarch64 support." }
- { date: "10.02.24:", desc: "Update Readme with new env vars and ingest proper PWA icon." }
- { date: "05.09.23:", desc: "Add openexr dependency." }
- { date: "18.03.23:", desc: "Rebase to KasmVNC base image." }
Expand Down
2 changes: 1 addition & 1 deletion root/defaults/autostart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
digikam
/opt/digikam/AppRun
5 changes: 2 additions & 3 deletions root/defaults/menu.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="MENU">
<item label="DigiKam" icon="/usr/share/icons/hicolor/48x48/apps/digikam.png"><action name="Execute"><command>/usr/sbin/digikam</command></action></item>
<item label="Firefox" icon="/usr/share/icons/hicolor/48x48/apps/firefox.png"><action name="Execute"><command>/usr/bin/firefox</command></action></item>
<item label="DigiKam" icon="/opt/digikam/usr/share/digikam/data/logo-digikam.png"><action name="Execute"><command>/opt/digikam/AppRun</command></action></item>
<item label="Chromium" icon="/usr/share/icons/hicolor/48x48/apps/chromium.png"><action name="Execute"><command>/usr/bin/chromium</command></action></item>
<item label="xterm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm"><action name="Execute"><command>/usr/bin/xterm</command></action></item>
<item label="Reload OB"><action name="Reconfigure"/></item>
</menu>
</openbox_menu>
31 changes: 31 additions & 0 deletions root/usr/bin/chromium
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

BIN=/usr/bin/chromium-real

# Cleanup
if ! pgrep chromium > /dev/null;then
rm -f $HOME/.config/chromium/Singleton*
fi

# Run normally on privved containers or modified un non priv
if grep -q 'Seccomp:.0' /proc/1/status; then
${BIN} \
--ignore-gpu-blocklist \
--no-first-run \
--password-store=basic \
--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' \
--start-maximized \
--user-data-dir \
"$@" > /dev/null 2>&1
else
${BIN} \
--ignore-gpu-blocklist \
--no-first-run \
--no-sandbox \
--password-store=basic \
--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' \
--start-maximized \
--test-type \
--user-data-dir \
"$@" > /dev/null 2>&1
fi