Build with local source instead of counting on go get.
Better cache busting semantics.
This commit is contained in:
parent
e0a0069de4
commit
b93f1e01f8
@ -1,11 +1,12 @@
|
|||||||
# build stage
|
# build stage
|
||||||
FROM golang:alpine AS build-env
|
FROM golang:alpine AS build-env
|
||||||
RUN apk --no-cache add git
|
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
|
# final stage
|
||||||
FROM alpine
|
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/
|
COPY keys/ /root/.ssh/
|
||||||
|
|
||||||
EXPOSE 9999
|
EXPOSE 9999
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user