Use multi-stage build to get a small docker image
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8dcd487a6a
commit
99fca5fe84
@ -1,8 +1,10 @@
|
||||
FROM golang:1.17-alpine
|
||||
FROM golang:1.17-alpine AS build
|
||||
|
||||
WORKDIR /app
|
||||
COPY . ./
|
||||
RUN go mod download
|
||||
RUN go build -o /bin/prometheus-dnssec-exporter
|
||||
ENTRYPOINT [ "/bin/prometheus-dnssec-exporter" ]
|
||||
|
||||
FROM alpine:3.14.2
|
||||
COPY --from=build /bin/prometheus-dnssec-exporter /bin/prometheus-dnssec-exporter
|
||||
ENTRYPOINT [ "/bin/prometheus-dnssec-exporter" ]
|
||||
|
Loading…
Reference in New Issue
Block a user