From 6ba0275f6e573367bdb0e21569ed3e4ec5c5c8fc Mon Sep 17 00:00:00 2001 From: Daniel Czerwonk Date: Fri, 10 Jan 2020 15:48:02 +0100 Subject: [PATCH] Update Dockerfile --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 481a73b..a4cd574 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ FROM golang as builder -RUN go get -d -v github.com/czerwonk/bird_exporter -WORKDIR /go/src/github.com/czerwonk/bird_exporter -RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . +ADD . /go/bird_exporter/ +WORKDIR /go/bird_exporter +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /go/bin/bird_exporter FROM alpine:latest RUN apk --no-cache add ca-certificates bash WORKDIR /app -COPY --from=builder /go/src/github.com/czerwonk/bird_exporter/app bird_exporter +COPY --from=builder /go/bin/bird_exporter . EXPOSE 9324 ENTRYPOINT ["/app/bird_exporter"]