[REF] base on busybox

This commit is contained in:
David Arnold
2018-02-11 13:23:35 -05:00
parent bf045a4be3
commit 3b400123d3

View File

@@ -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