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