Skip to content

Commit 0f721b1

Browse files
authored
Merge pull request #84 from linuxserver/master-rebase-plus-encryption
2 parents f1ffcc1 + 6394d61 commit 0f721b1

File tree

8 files changed

+93
-51
lines changed

8 files changed

+93
-51
lines changed

Dockerfile

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
3+
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble
44

55
# set version label
66
ARG BUILD_DATE
@@ -10,31 +10,33 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
1010
LABEL maintainer="aptalca"
1111

1212
# environment settings
13-
ENV HOME="/config"
14-
ENV DEBIAN_FRONTEND="noninteractive"
13+
ARG DEBIAN_FRONTEND="noninteractive"
14+
ENV HOME="/config" \
15+
TMPDIR=/run/duplicati-temp \
16+
DUPLICATI__REQUIRE_DB_ENCRYPTION_KEY=true \
17+
DUPLICATI__SERVER_DATAFOLDER=/config \
18+
DUPLICATI__WEBSERVICE_PORT=8200 \
19+
DUPLICATI__WEBSERVICE_INTERFACE=any \
20+
DUPLICATI__WEBSERVICE_ALLOWED_HOSTNAMES=*
1521

1622
RUN \
17-
echo "**** add mono repository ****" && \
18-
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
19-
echo "deb http://download.mono-project.com/repo/ubuntu stable-focal main" | tee /etc/apt/sources.list.d/mono-official.list && \
2023
echo "**** install packages ****" && \
2124
apt-get update && \
2225
apt-get install -y \
23-
mono-devel \
24-
mono-vbnc \
26+
libicu74 \
2527
unzip && \
2628
echo "**** install duplicati ****" && \
2729
if [ -z ${DUPLICATI_RELEASE+x} ]; then \
2830
DUPLICATI_RELEASE=$(curl -sX GET "https://api.github.com/repos/duplicati/duplicati/releases" \
2931
| jq -r 'first(.[] | select(.tag_name | contains("beta"))) | .tag_name'); \
3032
fi && \
31-
mkdir -p \
32-
/app/duplicati && \
33-
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) && \
33+
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$') && \
3434
curl -o \
3535
/tmp/duplicati.zip -L \
3636
"${duplicati_url}" && \
37-
unzip -q /tmp/duplicati.zip -d /app/duplicati && \
37+
unzip -q /tmp/duplicati.zip -d /app && \
38+
mv /app/duplicati* /app/duplicati && \
39+
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
3840
echo "**** cleanup ****" && \
3941
apt-get clean && \
4042
rm -rf \

Dockerfile.aarch64

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy
3+
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-noble
44

55
# set version label
66
ARG BUILD_DATE
@@ -10,31 +10,33 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
1010
LABEL maintainer="aptalca"
1111

1212
# environment settings
13-
ENV HOME="/config"
14-
ENV DEBIAN_FRONTEND="noninteractive"
13+
ARG DEBIAN_FRONTEND="noninteractive"
14+
ENV HOME="/config" \
15+
TMPDIR=/run/duplicati-temp \
16+
DUPLICATI__REQUIRE_DB_ENCRYPTION_KEY=true \
17+
DUPLICATI__SERVER_DATAFOLDER=/config \
18+
DUPLICATI__WEBSERVICE_PORT=8200 \
19+
DUPLICATI__WEBSERVICE_INTERFACE=any \
20+
DUPLICATI__WEBSERVICE_ALLOWED_HOSTNAMES=*
1521

1622
RUN \
17-
echo "**** add mono repository ****" && \
18-
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
19-
echo "deb http://download.mono-project.com/repo/ubuntu stable-focal main" | tee /etc/apt/sources.list.d/mono-official.list && \
2023
echo "**** install pockages ****" && \
2124
apt-get update && \
2225
apt-get install -y \
23-
mono-devel \
24-
mono-vbnc \
26+
libicu74 \
2527
unzip && \
2628
echo "**** install duplicati ****" && \
2729
if [ -z ${DUPLICATI_RELEASE+x} ]; then \
2830
DUPLICATI_RELEASE=$(curl -sX GET "https://api.github.com/repos/duplicati/duplicati/releases" \
2931
| jq -r 'first(.[] | select(.tag_name | contains("beta"))) | .tag_name'); \
3032
fi && \
31-
mkdir -p \
32-
/app/duplicati && \
33-
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) && \
33+
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$') && \
3434
curl -o \
3535
/tmp/duplicati.zip -L \
3636
"${duplicati_url}" && \
37-
unzip -q /tmp/duplicati.zip -d /app/duplicati && \
37+
unzip -q /tmp/duplicati.zip -d /app && \
38+
mv /app/duplicati* /app/duplicati && \
39+
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
3840
echo "**** cleanup ****" && \
3941
apt-get clean && \
4042
rm -rf \

Jenkinsfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ pipeline {
3535
CI_PORT='8200'
3636
CI_SSL='false'
3737
CI_DELAY='120'
38-
CI_DOCKERENV='TZ=US/Pacific|ISCI=true'
39-
CI_AUTH='user:password'
40-
CI_WEBPATH=''
38+
CI_DOCKERENV='SETTINGS_ENCRYPTION_KEY=abcde12345'
39+
CI_AUTH=''
40+
CI_WEBPATH='/login.html'
4141
}
4242
stages {
4343
stage("Set git config"){
@@ -543,7 +543,7 @@ pipeline {
543543
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
544544
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
545545
--label \"org.opencontainers.image.title=Duplicati\" \
546-
--label \"org.opencontainers.image.description=[Duplicati](https://www.duplicati.com/) works with standard protocols like FTP, SSH, WebDAV as well as popular services like Microsoft OneDrive, Amazon Cloud Drive & S3, Google Drive, box.com, Mega, hubiC and many others.\" \
546+
--label \"org.opencontainers.image.description=[Duplicati](https://www.duplicati.com/) is a backup client that securely stores encrypted, incremental, compressed backups on local storage, cloud storage services and remote file servers. It works with standard protocols like FTP, SSH, WebDAV as well as popular services like Microsoft OneDrive, Amazon S3, Google Drive, box.com, Mega, B2, and many others.\" \
547547
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
548548
--provenance=false --sbom=false \
549549
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
@@ -575,7 +575,7 @@ pipeline {
575575
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
576576
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
577577
--label \"org.opencontainers.image.title=Duplicati\" \
578-
--label \"org.opencontainers.image.description=[Duplicati](https://www.duplicati.com/) works with standard protocols like FTP, SSH, WebDAV as well as popular services like Microsoft OneDrive, Amazon Cloud Drive & S3, Google Drive, box.com, Mega, hubiC and many others.\" \
578+
--label \"org.opencontainers.image.description=[Duplicati](https://www.duplicati.com/) is a backup client that securely stores encrypted, incremental, compressed backups on local storage, cloud storage services and remote file servers. It works with standard protocols like FTP, SSH, WebDAV as well as popular services like Microsoft OneDrive, Amazon S3, Google Drive, box.com, Mega, B2, and many others.\" \
579579
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
580580
--provenance=false --sbom=false \
581581
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
@@ -604,7 +604,7 @@ pipeline {
604604
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
605605
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
606606
--label \"org.opencontainers.image.title=Duplicati\" \
607-
--label \"org.opencontainers.image.description=[Duplicati](https://www.duplicati.com/) works with standard protocols like FTP, SSH, WebDAV as well as popular services like Microsoft OneDrive, Amazon Cloud Drive & S3, Google Drive, box.com, Mega, hubiC and many others.\" \
607+
--label \"org.opencontainers.image.description=[Duplicati](https://www.duplicati.com/) is a backup client that securely stores encrypted, incremental, compressed backups on local storage, cloud storage services and remote file servers. It works with standard protocols like FTP, SSH, WebDAV as well as popular services like Microsoft OneDrive, Amazon S3, Google Drive, box.com, Mega, B2, and many others.\" \
608608
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
609609
--provenance=false --sbom=false \
610610
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Find us at:
3939
[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-duplicati%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-duplicati/job/master/)
4040
[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fduplicati%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/duplicati/latest/index.html)
4141

42-
[Duplicati](https://www.duplicati.com/) works with standard protocols like FTP, SSH, WebDAV as well as popular services like Microsoft OneDrive, Amazon Cloud Drive & S3, Google Drive, box.com, Mega, hubiC and many others.
42+
[Duplicati](https://www.duplicati.com/) is a backup client that securely stores encrypted, incremental, compressed backups on local storage, cloud storage services and remote file servers. It works with standard protocols like FTP, SSH, WebDAV as well as popular services like Microsoft OneDrive, Amazon S3, Google Drive, box.com, Mega, B2, and many others.
4343

4444
[![duplicati](https://github.com/linuxserver/docker-templates/raw/master/linuxserver.io/img/duplicati-icon.png)](https://www.duplicati.com/)
4545

@@ -68,7 +68,9 @@ This image provides various versions that are available via tags. Please read th
6868

6969
## Application Setup
7070

71-
The webui is at `<your ip>:8200` , create backup jobs etc via the webui, for local backups select `/backups` as the destination. For more information see [Duplicati](https://www.duplicati.com/).
71+
The webui is at `<your ip>:8200`.
72+
73+
For local backups select `/backups` as the destination. For more information see [Duplicati](https://www.duplicati.com/).
7274

7375

7476
## Usage
@@ -87,9 +89,11 @@ services:
8789
- PUID=1000
8890
- PGID=1000
8991
- TZ=Etc/UTC
92+
- SETTINGS_ENCRYPTION_KEY=
9093
- CLI_ARGS= #optional
94+
- DUPLICATI__WEBSERVICE_PASSWORD= #optional
9195
volumes:
92-
- /path/to/appdata/config:/config
96+
- /path/to/duplicati/config:/config
9397
- /path/to/backups:/backups
9498
- /path/to/source:/source
9599
ports:
@@ -105,9 +109,11 @@ docker run -d \
105109
-e PUID=1000 \
106110
-e PGID=1000 \
107111
-e TZ=Etc/UTC \
112+
-e SETTINGS_ENCRYPTION_KEY= \
108113
-e CLI_ARGS= `#optional` \
114+
-e DUPLICATI__WEBSERVICE_PASSWORD= `#optional` \
109115
-p 8200:8200 \
110-
-v /path/to/appdata/config:/config \
116+
-v /path/to/duplicati/config:/config \
111117
-v /path/to/backups:/backups \
112118
-v /path/to/source:/source \
113119
--restart unless-stopped \
@@ -124,7 +130,9 @@ Containers are configured using parameters passed at runtime (such as those abov
124130
| `-e PUID=1000` | for UserID - see below for explanation |
125131
| `-e PGID=1000` | for GroupID - see below for explanation |
126132
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
133+
| `-e SETTINGS_ENCRYPTION_KEY=` | Encryption key for settings database. Minimum 8 characters, alphanumeric. |
127134
| `-e CLI_ARGS=` | Optionally specify any [CLI variables](https://duplicati.readthedocs.io/en/latest/07-other-command-line-utilities/) you want to launch the app with |
135+
| `-e DUPLICATI__WEBSERVICE_PASSWORD=` | Password for the webui. If left unset will default to `changeme` and can be changed from the webui settings. |
128136
| `-v /config` | Contains all relevant configuration files. |
129137
| `-v /backups` | Path to store local backups. |
130138
| `-v /source` | Path to source for files to backup. |
@@ -291,7 +299,8 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
291299

292300
## Versions
293301

294-
* **15.02.23:** - Deprecate armhf.
302+
* **29.11.24:** - Rebase to Noble, add support for settings DB encryption.
303+
* **15.02.23:** - Rebase to Jammy.
295304
* **03.08.22:** - Deprecate armhf.
296305
* **25.04.22:** - Rebase to mono:focal.
297306
* **01.08.19:** - Rebase to Linuxserver LTS mono version.

jenkins-vars.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ external_type: custom_json
66
release_type: stable
77
release_tag: latest
88
ls_branch: master
9-
build_armhf: false
109
repo_vars:
1110
- JSON_URL = 'https://api.github.com/repos/duplicati/duplicati/releases'
1211
- JSON_PATH = 'first(.[] | select(.tag_name | contains("beta"))) | .tag_name'
@@ -24,6 +23,6 @@ repo_vars:
2423
- CI_PORT='8200'
2524
- CI_SSL='false'
2625
- CI_DELAY='120'
27-
- CI_DOCKERENV='TZ=US/Pacific|ISCI=true'
28-
- CI_AUTH='user:password'
29-
- CI_WEBPATH=''
26+
- CI_DOCKERENV='SETTINGS_ENCRYPTION_KEY=abcde12345'
27+
- CI_AUTH=''
28+
- CI_WEBPATH='/login.html'

readme-vars.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
project_name: duplicati
55
project_url: "https://www.duplicati.com/"
66
project_logo: "https://github.com/linuxserver/docker-templates/raw/master/linuxserver.io/img/duplicati-icon.png"
7-
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) works with standard protocols like FTP, SSH, WebDAV as well as popular services like Microsoft OneDrive, Amazon Cloud Drive & S3, Google Drive, box.com, Mega, hubiC and many others."
7+
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a backup client that securely stores encrypted, incremental, compressed backups on local storage, cloud storage services and remote file servers. It works with standard protocols like FTP, SSH, WebDAV as well as popular services like Microsoft OneDrive, Amazon S3, Google Drive, box.com, Mega, B2, and many others."
88
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
99

1010
# supported architectures
@@ -23,33 +23,34 @@ common_param_env_vars_enabled: true
2323
param_container_name: "{{ project_name }}"
2424
param_usage_include_vols: true
2525
param_volumes:
26-
- { vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Contains all relevant configuration files." }
26+
- { vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Contains all relevant configuration files." }
2727
- { vol_path: "/backups", vol_host_path: "/path/to/backups", desc: "Path to store local backups." }
2828
- { vol_path: "/source", vol_host_path: "/path/to/source", desc: "Path to source for files to backup." }
2929
param_usage_include_ports: true
3030
param_ports:
3131
- { external_port: "8200", internal_port: "8200", port_desc: "http gui" }
32+
3233
param_usage_include_env: true
3334
param_env_vars:
34-
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"}
35+
- { env_var: "SETTINGS_ENCRYPTION_KEY", env_value: "", desc: "Encryption key for settings database. Minimum 8 characters, alphanumeric."}
3536

3637
# optional container parameters
3738
opt_param_usage_include_env: true
3839
opt_param_env_vars:
3940
- { 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" }
40-
41-
# optional parameters
42-
optional_block_1: false
43-
optional_block_1_items: ""
41+
- { env_var: "DUPLICATI__WEBSERVICE_PASSWORD", env_value: "", desc: "Password for the webui. If left unset will default to `changeme` and can be changed from the webui settings."}
4442

4543
# application setup block
4644
app_setup_block_enabled: true
4745
app_setup_block: |
48-
The webui is at `<your ip>:8200` , create backup jobs etc via the webui, for local backups select `/backups` as the destination. For more information see [Duplicati]({{project_url}}).
46+
The webui is at `<your ip>:8200`.
47+
48+
For local backups select `/backups` as the destination. For more information see [Duplicati]({{project_url}}).
4949
5050
# changelog
5151
changelogs:
52-
- { date: "15.02.23:", desc: "Deprecate armhf." }
52+
- { date: "29.11.24:", desc: "Rebase to Noble, add support for settings DB encryption." }
53+
- { date: "15.02.23:", desc: "Rebase to Jammy." }
5354
- { date: "03.08.22:", desc: "Deprecate armhf." }
5455
- { date: "25.04.22:", desc: "Rebase to mono:focal." }
5556
- { date: "01.08.19:", desc: "Rebase to Linuxserver LTS mono version." }
Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
11
#!/usr/bin/with-contenv bash
22
# shellcheck shell=bash
33

4+
mkdir -p /run/duplicati-temp
5+
6+
if [[ -f "/config/Duplicati-server.sqlite" ]]; then
7+
# Existing install
8+
if [[ -n ${SETTINGS_ENCRYPTION_KEY} ]]; then
9+
# Enable settings encryption
10+
true
11+
else
12+
# Disable settings encryption
13+
printf "true" > /run/s6/container_environment/DUPLICATI__DISABLE_DB_ENCRYPTION
14+
echo "*** Missing encryption key, unable to encrypt your settings database ***"
15+
echo "*** Please set a value for SETTINGS_ENCRYPTION_KEY and recreate the container ***"
16+
fi
17+
else
18+
# New install
19+
if [[ -z ${DUPLICATI__WEBSERVICE_PASSWORD} ]]; then
20+
printf "changeme" > /run/s6/container_environment/DUPLICATI__WEBSERVICE_PASSWORD
21+
fi
22+
if [[ -n ${SETTINGS_ENCRYPTION_KEY} ]]; then
23+
# Enable settings encryption
24+
true
25+
else
26+
# Halt init
27+
echo "*** Missing encryption key, unable to encrypt your settings database ***"
28+
echo "*** Please set a value for SETTINGS_ENCRYPTION_KEY and recreate the container ***"
29+
sleep infinity
30+
fi
31+
fi
32+
433
# permissions
534
lsiown -R abc:abc \
6-
/config
35+
/config \
36+
/run/duplicati-temp

root/etc/s6-overlay/s6-rc.d/svc-duplicati/run

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33

44
exec \
55
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8200" \
6-
cd /app/duplicati s6-setuidgid abc mono Duplicati.Server.exe \
7-
--webservice-interface=any --server-datafolder=/config --webservice-allowed-hostnames=* $CLI_ARGS
6+
cd /app/duplicati s6-setuidgid abc ./duplicati-server $CLI_ARGS

0 commit comments

Comments
 (0)