From 3b400123d3dcb2d0357ba87c3f543494d2c10532 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Sun, 11 Feb 2018 13:23:35 -0500 Subject: [PATCH] [REF] base on busybox --- Dockerfile | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8da09dd..54b11f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,11 @@ -FROM golang:1.9-alpine as builder -MAINTAINER info@lobaro.com - -RUN echo http://nl.alpinelinux.org/alpine/v3.6/community >> /etc/apk/repositories -RUN apk add --no-cache git nfs-utils openssh fuse -RUN git clone https://github.com/restic/restic \ - && cd restic \ - && go run build.go \ - && cp restic /usr/local/bin/ -RUN apk del git - - FROM busybox -COPY --from=builder /usr/local/bin/restic /bin/ -RUN mkdir -p /mnt/restic /var/spool/cron/crontabs +# Get restic executable +ENV RESTIC_VERION=0.8.1 +ADD https://github.com/restic/restic/releases/download/v${RESTIC_VERION}/restic_${RESTIC_VERION}_linux_amd64.bz2 / +RUN bzip2 -d restic_${RESTIC_VERION}_linux_amd64.bz2 && mv restic_${RESTIC_VERION}_linux_amd64 /bin/restic && chmod +x /bin/restic + +RUN mkdir -p /mnt/restic /var/spool/cron/crontabs /var/log ENV RESTIC_REPOSITORY=/mnt/restic ENV RESTIC_PASSWORD="" @@ -28,7 +20,6 @@ ENV RESTIC_JOB_ARGS="" VOLUME /data COPY backup.sh /bin/backup - COPY entry.sh /entry.sh RUN touch /var/log/cron.log