mirror of
https://github.com/linuxserver/docker-duplicati.git
synced 2026-01-09 06:51:10 +08:00
56 lines
1.7 KiB
Docker
56 lines
1.7 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble
|
|
|
|
# set version label
|
|
ARG BUILD_DATE
|
|
ARG VERSION
|
|
ARG DUPLICATI_RELEASE
|
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
|
LABEL maintainer="aptalca"
|
|
|
|
# environment settings
|
|
ARG DEBIAN_FRONTEND="noninteractive"
|
|
ENV HOME="/config" \
|
|
TMPDIR=/run/duplicati-temp \
|
|
DUPLICATI__REQUIRE_DB_ENCRYPTION_KEY=true \
|
|
DUPLICATI__SERVER_DATAFOLDER=/config \
|
|
DUPLICATI__WEBSERVICE_PORT=8200 \
|
|
DUPLICATI__WEBSERVICE_INTERFACE=any \
|
|
DUPLICATI__WEBSERVICE_ALLOWED_HOSTNAMES=*
|
|
|
|
RUN \
|
|
echo "**** install packages ****" && \
|
|
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
|
|
apt-get update && \
|
|
apt-get install -y \
|
|
libicu74 \
|
|
ttf-mscorefonts-installer \
|
|
unzip \
|
|
xz-utils && \
|
|
echo "**** install duplicati ****" && \
|
|
if [ -z ${DUPLICATI_RELEASE+x} ]; then \
|
|
DUPLICATI_RELEASE=$(curl -sX GET "https://api.github.com/repos/duplicati/duplicati/releases/latest" \
|
|
| jq -r .tag_name); \
|
|
fi && \
|
|
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$') && \
|
|
curl -o \
|
|
/tmp/duplicati.zip -L \
|
|
"${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 \
|
|
/tmp/* \
|
|
/var/lib/apt/lists/* \
|
|
/var/tmp/*
|
|
|
|
# copy local files
|
|
COPY root/ /
|
|
|
|
# ports and volumes
|
|
EXPOSE 8200
|
|
VOLUME /backups /config /source
|