From b93f1e01f844f63b268353210aca2f50f00854ce Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Tue, 10 Oct 2017 20:33:25 -0700 Subject: [PATCH] Build with local source instead of counting on go get. Better cache busting semantics. --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 31781ed..6b36bf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,12 @@ # build stage FROM golang:alpine AS build-env RUN apk --no-cache add git -RUN go get -v xinu.tv/zfs_replication_exporter +ADD * /go/src/app/ +RUN go get -v app && go install -v app # final stage FROM alpine -COPY --from=build-env /go/bin/zfs_replication_exporter /usr/bin/ +COPY --from=build-env /go/bin/app /usr/bin/zfs_replication_exporter COPY keys/ /root/.ssh/ EXPOSE 9999