Files
plezy/server/Dockerfile
T

17 lines
568 B
Docker
Raw Normal View History

# Update the readable tag, index digest, and platforms together using the controlled process in CONTRIBUTING.md.
# Platforms: linux/amd64, linux/arm64
FROM golang:1.26.5-alpine3.23@sha256:622e56dbc11a8cfe87cafa2331e9a201877271cbff918af53d3be315f3da88cc AS build
2026-03-02 07:29:21 +01:00
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
2026-04-24 09:46:45 +02:00
COPY *.go .
2026-03-02 07:29:21 +01:00
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /relay .
FROM scratch
2026-04-24 09:46:45 +02:00
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
2026-03-02 07:29:21 +01:00
COPY --from=build /relay /relay
2026-04-22 14:57:41 +02:00
VOLUME /data
2026-03-02 07:29:21 +01:00
EXPOSE 8080
ENV GOMEMLIMIT=64MiB
ENTRYPOINT ["/relay"]