Use pre-compiled perl modules

This commit is contained in:
Adrien Ferrand 2018-09-12 10:15:35 +02:00
parent a274d739de
commit 40bcfa4eb1

View File

@ -1,4 +1,4 @@
FROM alpine:3.7
FROM alpine:3.8
LABEL maintainer="Adrien Ferrand <ferrand.ad@gmail.com>"
@ -7,14 +7,10 @@ ENV BACKUPPC_XS_VERSION 0.57
ENV RSYNC_BPC_VERSION 3.0.9.12
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
supervisor rsync samba-client iputils openssh openssl rrdtool msmtp lighttpd lighttpd-mod_auth gzip apache2-utils tzdata libstdc++ libgomp libgcc shadow \
# Compile and install needed perl modules
&& cpan App::cpanminus \
&& cpanm -n Archive::Zip XML::RSS File::Listing \
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 \
# Install backuppc build dependencies
&& apk --no-cache --update --virtual add gcc g++ libgcc autoconf automake make git patch expat-dev curl wget \
# Compile and install BackupPC:XS
&& git clone https://github.com/backuppc/backuppc-xs.git /root/backuppc-xs --branch $BACKUPPC_XS_VERSION \
&& cd /root/backuppc-xs \
@ -39,7 +35,7 @@ supervisor rsync samba-client iputils openssh openssl rrdtool msmtp lighttpd lig
&& touch /firstrun \
# Clean
&& rm -rf /root/backuppc-xs /root/rsync-bpc /root/par2cmdline \
&& apk --no-cache del gcc g++ autoconf automake make git patch perl-dev expat-dev curl wget
&& apk del build-dependencies
COPY files/lighttpd.conf /etc/lighttpd/lighttpd.conf
COPY files/entrypoint.sh /entrypoint.sh