-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
122 lines (117 loc) · 3.74 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
ARG DISTRO="alpine"
ARG DISTRO_VARIANT="3.19"
FROM docker.io/tiredofit/nginx:${DISTRO}-${DISTRO_VARIANT}
LABEL maintainer="Dave Conroy (github.com/tiredofit)"
ARG BACKUPPC_VERSION
ARG BACKUPPC_XS_VERSION
ARG PAR2_VERSION
ARG RSYNC_BPC_VERSION
ENV BACKUPPC_VERSION=${BACKUPPC_VERSION:-"4.4.0"} \
BACKUPPC_XS_VERSION=${BACKUPPC_XS_VERSION:-"0.62"} \
PAR2_VERSION=${PAR2_VERSION:-"v0.8.0"} \
RSYNC_BPC_VERSION=${RSYNC_BPC_VERSION:-"3.1.3.0"} \
CONTAINER_ENABLE_PERMISSIONS=TRUE \
USER_BACKUPPC=1000 \
GROUP_BACKUPPC=1000 \
NGINX_ENABLE_CREATE_SAMPLE_HTML=FALSE \
NGINX_LISTEN_PORT=80 \
NGINX_USER=backuppc \
NGINX_GROUP=backuppc \
NGINX_SITE_ENABLED=backuppc \
CONTAINER_ENABLE_MESSAGING=TRUE \
IMAGE_NAME="tiredofit/backuppc" \
IMAGE_REPO_URL="https://github.com/tiredofit/docker-backuppc/"
RUN source /assets/functions/00-container && \
set -x && \
addgroup -S -g ${GROUP_BACKUPPC} backuppc && \
adduser -D \
-S \
-h /home/backuppc \
-s /sbin/nologin -G backuppc -g "backuppc" -u ${USER_BACKUPPC} backuppc \
&& \
addgroup zabbix backuppc && \
package update && \
package upgrade && \
package install .backuppc-build-deps \
autoconf \
automake \
acl-dev \
build-base \
bzip2-dev \
expat-dev \
g++ \
gcc \
git \
make \
patch \
perl-dev \
perl-app-cpanminus \
&& \
\
package install .backuppc-run-deps \
bzip2 \
expat \
gzip \
fcgiwrap \
iputils \
libgomp \
openssh \
openssl \
perl \
perl-archive-zip \
perl-cgi \
perl-file-listing \
perl-json-xs \
perl-time-parsedate \
perl-xml-rss \
pigz \
rrdtool \
rsync \
samba-client \
spawn-fcgi \
sudo \
ttf-dejavu \
&& \
\
cpanm -M https://cpan.metacpan.org install \
Net::FTP \
Net::FTP::AutoReconnect \
&& \
\
mkdir -p /usr/src/pbzip2 && \
curl -ssL https://launchpad.net/pbzip2/1.1/1.1.13/+download/pbzip2-1.1.13.tar.gz | tar xvfz - --strip=1 -C /usr/src/pbzip2 && \
cd /usr/src/pbzip2 && \
make -j$(nproc)&& \
make install && \
\
clone_git_repo https://github.com/backuppc/backuppc-xs.git ${BACKUPPC_XS_VERSION} && \
perl Makefile.PL && \
make -j$(nproc)&& \
make test && \
make install && \
\
clone_git_repo https://github.com/backuppc/rsync-bpc.git ${RSYNC_BPC_VERSION} && \
./configure && \
make reconfigure && \
make -j$(nproc)&& \
make install && \
\
clone_git_repo https://github.com/Parchive/par2cmdline.git ${PAR2_VERSION} && \
./automake.sh && \
./configure && \
make -j$(nproc)&& \
make check && \
make install && \
\
mkdir -p /assets/install && \
curl -sSL https://github.com/backuppc/backuppc/releases/download/$BACKUPPC_VERSION/BackupPC-$BACKUPPC_VERSION.tar.gz | tar xvfz - --strip 1 -C /assets/install && \
\
curl -sSL https://github.com/backuppc/backuppc/commit/2c9270b9b849b2c86ae6301dd722c97757bc9256.patch -o /assets/install/patchfile.patch && \
cd /assets/install && \
patch -p1 < patchfile.patch && \
package remove .backuppc-build-deps && \
package cleanup && \
rm -rf /root/.cpanm \
/tmp/* \
/usr/src/*
COPY install/ /