forked from themorlan/docker_urbackup
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathDockerfile
48 lines (43 loc) · 1.71 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
ARG DEBIAN=bullseye
FROM debian:${DEBIAN}
ARG DEBIAN=bullseye
ARG VERSION=2.5.33
ARG TARGETPLATFORM
ARG BTRFS
ARG ZFS
COPY entrypoint.sh /usr/bin/
RUN URL=https://hndl.urbackup.org/Server/${VERSION} && \
case ${TARGETPLATFORM} in \
"linux/amd64") URL=$URL/urbackup-server_${VERSION}_amd64.deb ;; \
"linux/arm64") URL=$URL/urbackup-server_${VERSION}_arm64.deb ;; \
"linux/arm/v7") URL=$URL/urbackup-server_${VERSION}_armhf.deb ;; \
"linux/386" | "linux/i386") URL=$URL/debian/${DEBIAN}/urbackup-server_${VERSION}_i386.deb ;; \
esac \
&& dry="http://deb.debian.org/debian ${DEBIAN}-backports main contrib" \
&& echo "deb $dry\ndeb-src $dry" >/etc/apt/sources.list.d/${DEBIAN}-backports.list \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y wget \
&& wget -q "$URL" -O /root/urbackup-server.deb \
&& apt-get remove -y wget \
&& apt-get autoremove -y \
&& echo "urbackup-server urbackup/backuppath string /backups" \
| debconf-set-selections \
&& apt-get install -y --no-install-recommends \
/root/urbackup-server.deb \
${BTRFS:+btrfs-progs} \
${ZFS:+zfsutils-linux} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
/etc/apt/sources.list.d/${DEBIAN}-backports.list \
/root/urbackup-server.deb \
&& cp -R /usr/share/urbackup /web-backup \
&& chmod +x /usr/bin/entrypoint.sh
EXPOSE 55413
EXPOSE 55414
EXPOSE 55415
EXPOSE 35623/udp
# /usr/share/urbackup will not be exported to a volume by default, but it still can be bind mounted
VOLUME [ "/var/urbackup", "/var/log", "/backups" ]
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
CMD ["run"]