generated from adoralaura/template-exporter
32 lines
619 B
Text
32 lines
619 B
Text
|
FROM golang:1.22-bullseye AS dev
|
||
|
|
||
|
COPY . /var/app
|
||
|
WORKDIR /var/app
|
||
|
|
||
|
|
||
|
ENV GO111MODULE="on" \
|
||
|
CGO_ENABLED=0 \
|
||
|
GOOS=linux
|
||
|
|
||
|
EXPOSE 80
|
||
|
ENTRYPOINT ["sh"]
|
||
|
|
||
|
|
||
|
FROM dev as build
|
||
|
|
||
|
RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --assume-yes ca-certificates
|
||
|
RUN go mod download && go mod verify
|
||
|
RUN go build -o template-exporter main.go
|
||
|
RUN chmod +x template-exporter
|
||
|
|
||
|
|
||
|
FROM gcr.io/distroless/static-debian12 AS prod
|
||
|
|
||
|
WORKDIR /app
|
||
|
COPY --from=build /var/app/template-exporter /bin/
|
||
|
|
||
|
LABEL maintainer="Adora Laura Kalb <adora@lila.network>"
|
||
|
|
||
|
EXPOSE 43609
|
||
|
ENTRYPOINT ["/bin/template-exporter"]
|