forked from irontoby/docker-backuppc
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
27 lines (20 loc) · 1.06 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
FROM ubuntu:22.04
VOLUME ["/var/lib/backuppc"]
EXPOSE 80
CMD ["/run.sh"]
RUN echo "postfix postfix/main_mailer_type select Local only" | debconf-set-selections \
&& echo "backuppc backuppc/configuration-note note" | debconf-set-selections \
&& echo "backuppc backuppc/restart-webserver boolean true" | debconf-set-selections \
&& echo "backuppc backuppc/reconfigure-webserver multiselect apache2" | debconf-set-selections
RUN apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends msmtp backuppc backuppc-rsync smbclient openssh-client samba-common-bin apache2-utils supervisor \
&& apt-get clean \
&& rm /var/lib/apt/lists/* -fR
RUN htpasswd -b /etc/backuppc/htpasswd backuppc password
RUN sed -i 's/Require local/#Require local/' /etc/apache2/conf-enabled/backuppc.conf \
&& sed -i 's/\/usr\/sbin\/sendmail/\/usr\/bin\/msmtp/g' /etc/backuppc/config.pl
RUN mkdir /run/backuppc \
&& chown backuppc:backuppc /run/backuppc
COPY supervisord.conf /etc/supervisord.conf
COPY msmtprc /var/lib/backuppc/.msmtprc
COPY run.sh /run.sh