Files
nginx-stream-server/Dockerfile
jbergner 4f8a2fd178
All checks were successful
release-tag / release-image (push) Successful in 1m56s
Debug ohne Embed
2025-09-21 17:55:34 +02:00

23 lines
598 B
Docker

# --- Build ---
FROM golang:1.24-alpine AS build
WORKDIR /src
RUN apk add --no-cache git ca-certificates tzdata && update-ca-certificates
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ENV CGO_ENABLED=0
RUN --mount=type=cache,target=/root/.cache/go-build \
go build -trimpath -ldflags="-s -w" -o /out/dashboard ./cmd/dashboard
# --- Runtime ---
FROM gcr.io/distroless/base-debian12:nonroot
WORKDIR /app
EXPOSE 8080
# Binärdatei
COPY --from=build /out/dashboard /app/dashboard
# Statische Dateien:
COPY web /app/web
ENV WEB_ROOT=/app/web
USER nonroot:nonroot
ENTRYPOINT ["/app/dashboard"]