mirror of
https://github.com/adferrand/docker-backuppc.git
synced 2023-11-05 04:40:26 +01:00
Use pre-compiled perl modules
This commit is contained in:
parent
a274d739de
commit
40bcfa4eb1
62
Dockerfile
62
Dockerfile
@ -1,4 +1,4 @@
|
|||||||
FROM alpine:3.7
|
FROM alpine:3.8
|
||||||
|
|
||||||
LABEL maintainer="Adrien Ferrand <ferrand.ad@gmail.com>"
|
LABEL maintainer="Adrien Ferrand <ferrand.ad@gmail.com>"
|
||||||
|
|
||||||
@ -7,39 +7,35 @@ ENV BACKUPPC_XS_VERSION 0.57
|
|||||||
ENV RSYNC_BPC_VERSION 3.0.9.12
|
ENV RSYNC_BPC_VERSION 3.0.9.12
|
||||||
ENV PAR2_VERSION v0.8.0
|
ENV PAR2_VERSION v0.8.0
|
||||||
|
|
||||||
RUN apk --no-cache add \
|
|
||||||
# Install backuppc build dependencies
|
|
||||||
gcc g++ autoconf automake make git patch perl perl-dev perl-cgi expat expat-dev curl wget \
|
|
||||||
# Install backuppc runtime dependencies
|
# Install backuppc runtime dependencies
|
||||||
supervisor rsync samba-client iputils openssh openssl rrdtool msmtp lighttpd lighttpd-mod_auth gzip apache2-utils tzdata libstdc++ libgomp libgcc shadow \
|
RUN apk --no-cache --update add supervisor rsync perl perl-archive-zip perl-xml-rss perl-cgi perl-file-listing expat samba-client iputils openssh openssl rrdtool msmtp lighttpd lighttpd-mod_auth gzip apache2-utils tzdata libstdc++ libgomp shadow \
|
||||||
# Compile and install needed perl modules
|
# Install backuppc build dependencies
|
||||||
&& cpan App::cpanminus \
|
&& apk --no-cache --update --virtual add gcc g++ libgcc autoconf automake make git patch expat-dev curl wget \
|
||||||
&& cpanm -n Archive::Zip XML::RSS File::Listing \
|
# Compile and install BackupPC:XS
|
||||||
# Compile and install BackupPC:XS
|
&& git clone https://github.com/backuppc/backuppc-xs.git /root/backuppc-xs --branch $BACKUPPC_XS_VERSION \
|
||||||
&& git clone https://github.com/backuppc/backuppc-xs.git /root/backuppc-xs --branch $BACKUPPC_XS_VERSION \
|
&& cd /root/backuppc-xs \
|
||||||
&& cd /root/backuppc-xs \
|
&& perl Makefile.PL && make && make test && make install \
|
||||||
&& perl Makefile.PL && make && make test && make install \
|
# Compile and install Rsync (BPC version)
|
||||||
# Compile and install Rsync (BPC version)
|
&& git clone https://github.com/backuppc/rsync-bpc.git /root/rsync-bpc --branch $RSYNC_BPC_VERSION \
|
||||||
&& git clone https://github.com/backuppc/rsync-bpc.git /root/rsync-bpc --branch $RSYNC_BPC_VERSION \
|
&& cd /root/rsync-bpc && ./configure && make reconfigure && make && make install \
|
||||||
&& cd /root/rsync-bpc && ./configure && make reconfigure && make && make install \
|
# Compile and install PAR2
|
||||||
# Compile and install PAR2
|
&& git clone https://github.com/Parchive/par2cmdline.git /root/par2cmdline --branch $PAR2_VERSION \
|
||||||
&& git clone https://github.com/Parchive/par2cmdline.git /root/par2cmdline --branch $PAR2_VERSION \
|
&& cd /root/par2cmdline && ./automake.sh && ./configure && make && make check && make install \
|
||||||
&& cd /root/par2cmdline && ./automake.sh && ./configure && make && make check && make install \
|
# Configure MSMTP for mail delivery (initially sendmail is a sym link to busybox)
|
||||||
# Configure MSMTP for mail delivery (initially sendmail is a sym link to busybox)
|
&& rm -f /usr/sbin/sendmail \
|
||||||
&& rm -f /usr/sbin/sendmail \
|
&& ln -s /usr/bin/msmtp /usr/sbin/sendmail \
|
||||||
&& ln -s /usr/bin/msmtp /usr/sbin/sendmail \
|
# Disable strict host key checking
|
||||||
# Disable strict host key checking
|
&& sed -i -e 's/^# Host \*/Host */g' /etc/ssh/ssh_config \
|
||||||
&& sed -i -e 's/^# Host \*/Host */g' /etc/ssh/ssh_config \
|
&& sed -i -e 's/^# StrictHostKeyChecking ask/ StrictHostKeyChecking no/g' /etc/ssh/ssh_config \
|
||||||
&& sed -i -e 's/^# StrictHostKeyChecking ask/ StrictHostKeyChecking no/g' /etc/ssh/ssh_config \
|
# Get BackupPC, it will be installed at runtime to allow dynamic upgrade of existing config/pool
|
||||||
# Get BackupPC, it will be installed at runtime to allow dynamic upgrade of existing config/pool
|
&& curl -o /root/BackupPC-$BACKUPPC_VERSION.tar.gz -L https://github.com/backuppc/backuppc/releases/download/$BACKUPPC_VERSION/BackupPC-$BACKUPPC_VERSION.tar.gz \
|
||||||
&& curl -o /root/BackupPC-$BACKUPPC_VERSION.tar.gz -L https://github.com/backuppc/backuppc/releases/download/$BACKUPPC_VERSION/BackupPC-$BACKUPPC_VERSION.tar.gz \
|
# Prepare backuppc home
|
||||||
# Prepare backuppc home
|
&& mkdir -p /home/backuppc \
|
||||||
&& mkdir -p /home/backuppc \
|
# Mark the docker as not runned yet, to allow entrypoint to do its stuff
|
||||||
# Mark the docker as not runned yet, to allow entrypoint to do its stuff
|
&& touch /firstrun \
|
||||||
&& touch /firstrun \
|
# Clean
|
||||||
# Clean
|
&& rm -rf /root/backuppc-xs /root/rsync-bpc /root/par2cmdline \
|
||||||
&& rm -rf /root/backuppc-xs /root/rsync-bpc /root/par2cmdline \
|
&& apk del build-dependencies
|
||||||
&& apk --no-cache del gcc g++ autoconf automake make git patch perl-dev expat-dev curl wget
|
|
||||||
|
|
||||||
COPY files/lighttpd.conf /etc/lighttpd/lighttpd.conf
|
COPY files/lighttpd.conf /etc/lighttpd/lighttpd.conf
|
||||||
COPY files/entrypoint.sh /entrypoint.sh
|
COPY files/entrypoint.sh /entrypoint.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user