generated from silinternational/template-public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (25 loc) · 1.02 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
FROM alpine:3
# Variables set with ARG can be overridden at image build time with
# "--build-arg var=value". They are not available in the running container.
ARG restic_ver=0.16.0
ARG tfc_ops_ver=3.5.4
ARG tfc_ops_distrib=tfc-ops_Linux_x86_64.tar.gz
# Install Restic, tfc-ops, perl, and jq
RUN cd /tmp \
&& wget -O /tmp/restic.bz2 \
https://github.com/restic/restic/releases/download/v${restic_ver}/restic_${restic_ver}_linux_amd64.bz2 \
&& bunzip2 /tmp/restic.bz2 \
&& chmod +x /tmp/restic \
&& mv /tmp/restic /usr/local/bin/restic \
&& wget https://github.com/silinternational/tfc-ops/releases/download/v${tfc_ops_ver}/${tfc_ops_distrib} \
&& tar zxf ${tfc_ops_distrib} \
&& rm LICENSE README.md ${tfc_ops_distrib} \
&& mv tfc-ops /usr/local/bin \
&& apk update \
&& apk add --no-cache perl jq curl \
&& rm -rf /var/cache/apk/*
COPY ./tfc-backup-b2.sh /usr/local/bin/tfc-backup-b2.sh
COPY ./tfc-dump.pl /usr/local/bin/tfc-dump.pl
COPY application/ /data/
WORKDIR /data
CMD [ "/usr/local/bin/tfc-backup-b2.sh" ]