From 9e028df9a7cd40c72bbd82868a03e2d247a3f8f5 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Sun, 11 Feb 2018 12:08:37 -0500 Subject: [PATCH] [IMP] implement two stage build --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 74b2da6..18d2099 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.9-alpine +FROM golang:1.9-alpine as builder MAINTAINER info@lobaro.com RUN echo http://nl.alpinelinux.org/alpine/v3.6/community >> /etc/apk/repositories @@ -9,7 +9,11 @@ RUN git clone https://github.com/restic/restic \ && cp restic /usr/local/bin/ RUN apk del git -RUN mkdir /mnt/restic + +FROM busybox + +COPY --from=builder /usr/local/bin/restic /bin/ +RUN mkdir -p /mnt/restic /var/spool/cron/crontabs ENV RESTIC_REPOSITORY=/mnt/restic ENV RESTIC_PASSWORD=""