Bump go version and dependencies

This commit is contained in:
Tomy Guichard 2023-03-04 14:32:20 +01:00
parent 5d2b77a38c
commit 4bac289600
3 changed files with 367 additions and 24 deletions

View file

@ -1,12 +1,14 @@
# Build stage
FROM golang:1.17-alpine AS build
FROM golang:1.20-alpine AS build
WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . .
RUN go build -o /livebox-exporter
# Final image
FROM alpine:3.14
FROM gcr.io/distroless/static-debian11
WORKDIR /
COPY --from=build /livebox-exporter /usr/local/bin/livebox-exporter
EXPOSE 8080
USER 10001:10001
USER 65534:65534
ENTRYPOINT ["livebox-exporter"]