forgejo-release-proxy/Dockerfile

31 lines
581 B
Text
Raw Permalink Normal View History

2024-08-03 16:29:19 +02:00
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"]
2024-08-03 17:34:18 +02:00
FROM dev AS build
2024-08-03 16:29:19 +02:00
RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --assume-yes ca-certificates make git
RUN go mod download && go mod verify
RUN make build
FROM gcr.io/distroless/static-debian12 AS prod
WORKDIR /app
2024-08-03 17:36:51 +02:00
COPY --from=build /var/app/bin/forgejo-release-proxy /bin/
2024-08-03 16:29:19 +02:00
LABEL maintainer="Adora Laura Kalb <adora@lila.network>"
EXPOSE 8080
ENTRYPOINT ["/bin/forgejo-release-proxy"]