From 54fd2241a1e4e26aea2876d04e4b0e3b4889d1dc Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Sat, 5 Mar 2022 00:36:48 +0100 Subject: [PATCH] Fix dockerfile Signed-off-by: Julien Pivotto --- Dockerfile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index ba72137..b2c3a9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,12 @@ -FROM golang:1.15 as build -WORKDIR $GOPATH/avalanche -COPY . . -RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -o=/bin/avalanche ./cmd +ARG ARCH="amd64" +ARG OS="linux" +FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest +LABEL maintainer="The Prometheus Authors " -FROM scratch -COPY --from=build /bin/avalanche /bin/avalanche -EXPOSE 9001 -ENTRYPOINT ["/bin/avalanche"] +ARG ARCH="amd64" +ARG OS="linux" +COPY .build/${OS}-${ARCH}/avalanche /bin/avalanche + +EXPOSE 9101 +USER nobody +ENTRYPOINT [ "/bin/avalanche" ]