From a167c81606795cb18bb43231ae96bcf1e807d719 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Thu, 30 May 2024 12:57:00 -0400 Subject: [PATCH 1/2] rebase to noble, switch to net core --- Dockerfile | 19 +++++++------------ Dockerfile.aarch64 | 17 ++++++----------- README.md | 5 +++-- readme-vars.yml | 10 ++-------- root/etc/s6-overlay/s6-rc.d/svc-duplicati/run | 2 +- 5 files changed, 19 insertions(+), 34 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3dd901c..cb02f2c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy +FROM ghcr.io/linuxserver/baseimage-ubuntu:noble # set version label ARG BUILD_DATE @@ -14,28 +14,23 @@ ARG DEBIAN_FRONTEND="noninteractive" ENV HOME="/config" RUN \ - echo "**** add mono repository ****" && \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \ - echo "deb http://download.mono-project.com/repo/ubuntu stable-focal main" | tee /etc/apt/sources.list.d/mono-official.list && \ echo "**** install packages ****" && \ apt-get update && \ apt-get install -y \ - mono-devel \ - mono-vbnc \ + libicu74 \ unzip && \ echo "**** install duplicati ****" && \ if [ -z ${DUPLICATI_RELEASE+x} ]; then \ DUPLICATI_RELEASE=$(curl -sX GET "https://api.github.com/repos/duplicati/duplicati/releases" \ | jq -r 'first(.[] | select(.tag_name | contains("canary"))) | .tag_name'); \ fi && \ - mkdir -p \ - /app/duplicati && \ - duplicati_url=$(curl -s https://api.github.com/repos/duplicati/duplicati/releases/tags/"${DUPLICATI_RELEASE}" |jq -r '.assets[].browser_download_url' |grep '.zip$' |grep -v signatures) || \ - duplicati_url="https://updates.duplicati.com/canary/duplicati-$(echo $DUPLICATI_RELEASE | sed 's|^v[0-9.]*-||').zip" && \ - curl -fso \ + duplicati_url=$(curl -s https://api.github.com/repos/duplicati/duplicati/releases/tags/"${DUPLICATI_RELEASE}" |jq -r '.assets[].browser_download_url' |grep 'linux-x64-gui.zip$') || \ + duplicati_url="https://updates.duplicati.com/canary/duplicati-${DUPLICATI_RELEASE}-linux-x64-gui.zip" && \ + curl -fo \ /tmp/duplicati.zip -L \ "${duplicati_url}" && \ - unzip -q /tmp/duplicati.zip -d /app/duplicati && \ + unzip -q /tmp/duplicati.zip -d /app && \ + mv /app/duplicati* /app/duplicati && \ echo "**** cleanup ****" && \ apt-get clean && \ rm -rf \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 5413fb1..133998b 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy +FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-noble # set version label ARG BUILD_DATE @@ -14,28 +14,23 @@ ARG DEBIAN_FRONTEND="noninteractive" ENV HOME="/config" RUN \ - echo "**** add mono repository ****" && \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \ - echo "deb http://download.mono-project.com/repo/ubuntu stable-focal main" | tee /etc/apt/sources.list.d/mono-official.list && \ echo "**** install packages ****" && \ apt-get update && \ apt-get install -y \ - mono-devel \ - mono-vbnc \ + libicu74 \ unzip && \ echo "**** install duplicati ****" && \ if [ -z ${DUPLICATI_RELEASE+x} ]; then \ DUPLICATI_RELEASE=$(curl -sX GET "https://api.github.com/repos/duplicati/duplicati/releases" \ | jq -r 'first(.[] | select(.tag_name | contains("canary"))) | .tag_name'); \ fi && \ - mkdir -p \ - /app/duplicati && \ - duplicati_url=$(curl -s https://api.github.com/repos/duplicati/duplicati/releases/tags/"${DUPLICATI_RELEASE}" |jq -r '.assets[].browser_download_url' |grep '.zip$' |grep -v signatures) || \ - duplicati_url="https://updates.duplicati.com/canary/duplicati-$(echo $DUPLICATI_RELEASE | sed 's|^v[0-9.]*-||').zip" && \ + duplicati_url=$(curl -s https://api.github.com/repos/duplicati/duplicati/releases/tags/"${DUPLICATI_RELEASE}" |jq -r '.assets[].browser_download_url' |grep 'linux-arm64-gui.zip$') || \ + duplicati_url="https://updates.duplicati.com/canary/duplicati-${DUPLICATI_RELEASE}-linux-arm64-gui.zip" && \ curl -fso \ /tmp/duplicati.zip -L \ "${duplicati_url}" && \ - unzip -q /tmp/duplicati.zip -d /app/duplicati && \ + unzip -q /tmp/duplicati.zip -d /app && \ + mv /app/duplicati* /app/duplicati && \ echo "**** cleanup ****" && \ apt-get clean && \ rm -rf \ diff --git a/README.md b/README.md index 6b5bebd..22c2bdd 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ services: - TZ=Etc/UTC - CLI_ARGS= #optional volumes: - - /path/to/appdata/config:/config + - /path/to/duplicati/config:/config - /path/to/backups:/backups - /path/to/source:/source ports: @@ -106,7 +106,7 @@ docker run -d \ -e TZ=Etc/UTC \ -e CLI_ARGS= `#optional` \ -p 8200:8200 \ - -v /path/to/appdata/config:/config \ + -v /path/to/duplicati/config:/config \ -v /path/to/backups:/backups \ -v /path/to/source:/source \ --restart unless-stopped \ @@ -289,6 +289,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **30.05.23:** - Rebase to Noble, switch to net core. * **15.02.23:** - Rebase to Jammy. * **03.08.22:** - Deprecate armhf. * **13.03.22:** - Fix artifact link. diff --git a/readme-vars.yml b/readme-vars.yml index c4e71df..025b192 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -23,25 +23,18 @@ common_param_env_vars_enabled: true param_container_name: "{{ project_name }}" param_usage_include_vols: true param_volumes: - - { vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Contains all relevant configuration files." } + - { vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Contains all relevant configuration files." } - { vol_path: "/backups", vol_host_path: "/path/to/backups", desc: "Path to store local backups." } - { vol_path: "/source", vol_host_path: "/path/to/source", desc: "Path to source for files to backup." } param_usage_include_ports: true param_ports: - { external_port: "8200", internal_port: "8200", port_desc: "http gui" } -param_usage_include_env: true -param_env_vars: - - { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"} # optional container parameters opt_param_usage_include_env: true opt_param_env_vars: - { env_var: "CLI_ARGS", env_value: "", desc: "Optionally specify any [CLI variables](https://duplicati.readthedocs.io/en/latest/07-other-command-line-utilities/) you want to launch the app with" } -# optional parameters -optional_block_1: false -optional_block_1_items: "" - # application setup block app_setup_block_enabled: true app_setup_block: | @@ -49,6 +42,7 @@ app_setup_block: | # changelog changelogs: + - { date: "30.05.23:", desc: "Rebase to Noble, switch to net core." } - { date: "15.02.23:", desc: "Rebase to Jammy." } - { date: "03.08.22:", desc: "Deprecate armhf." } - { date: "13.03.22:", desc: "Fix artifact link." } diff --git a/root/etc/s6-overlay/s6-rc.d/svc-duplicati/run b/root/etc/s6-overlay/s6-rc.d/svc-duplicati/run index 23ca6b4..a562b12 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-duplicati/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-duplicati/run @@ -3,5 +3,5 @@ exec \ s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8200" \ - cd /app/duplicati s6-setuidgid abc mono Duplicati.Server.exe \ + cd /app/duplicati s6-setuidgid abc ./duplicati-server \ --webservice-interface=any --server-datafolder=/config --webservice-allowed-hostnames=* $CLI_ARGS From a138c5265c856785d972820804517fd757db4da0 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Thu, 30 May 2024 13:13:20 -0400 Subject: [PATCH 2/2] store version in image --- Dockerfile | 1 + Dockerfile.aarch64 | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index cb02f2c..b9c9fe3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,7 @@ RUN \ "${duplicati_url}" && \ unzip -q /tmp/duplicati.zip -d /app && \ mv /app/duplicati* /app/duplicati && \ + printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ apt-get clean && \ rm -rf \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 133998b..06be6a4 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -31,6 +31,7 @@ RUN \ "${duplicati_url}" && \ unzip -q /tmp/duplicati.zip -d /app && \ mv /app/duplicati* /app/duplicati && \ + printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ apt-get clean && \ rm -rf \