init
Some checks failed
release-tag / release-image (push) Failing after 1m16s

This commit is contained in:
2025-08-29 22:39:35 +02:00
parent 733636c2c5
commit d0659843a3
5 changed files with 322 additions and 0 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
# ---------- Build stage ----------
FROM golang:1.22-alpine AS build
WORKDIR /src
# optional, aber nett für reproduzierbare Builds:
ENV CGO_ENABLED=0
# Falls du private CAs brauchst, sonst weglassen:
RUN apk add --no-cache ca-certificates
COPY go.mod ./
COPY main.go ./
RUN go build -o /out/mirrorweb -trimpath -ldflags="-s -w"
# ---------- Runtime stage ----------
FROM alpine:3.20
# Für TLS (falls du Traefik mal nicht davor hast) und saubere Zeit:
RUN apk add --no-cache ca-certificates tzdata && update-ca-certificates
# Non-root User
RUN addgroup -S app && adduser -S -G app app
USER app
WORKDIR /
VOLUME ["/data"] # hier hängt dein Mirror-Volume read-only
EXPOSE 8080
COPY --from=build /out/mirrorweb /mirrorweb
ENTRYPOINT ["/mirrorweb"]