bugfix: Kommentar führ zu Problemen im Image
All checks were successful
release-tag / release-image (push) Successful in 1m33s
All checks were successful
release-tag / release-image (push) Successful in 1m33s
This commit is contained in:
@@ -1,24 +1,17 @@
|
|||||||
# ---------- Build stage ----------
|
|
||||||
FROM golang:1.24-alpine AS build
|
FROM golang:1.24-alpine AS build
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
# optional, aber nett für reproduzierbare Builds:
|
|
||||||
ENV CGO_ENABLED=0
|
ENV CGO_ENABLED=0
|
||||||
# Falls du private CAs brauchst, sonst weglassen:
|
|
||||||
RUN apk add --no-cache ca-certificates
|
RUN apk add --no-cache ca-certificates
|
||||||
COPY go.* ./
|
COPY go.* ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/mirrorweb
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/mirrorweb
|
||||||
|
|
||||||
# ---------- Runtime stage ----------
|
|
||||||
FROM alpine:3.22
|
FROM alpine:3.22
|
||||||
# Für TLS (falls du Traefik mal nicht davor hast) und saubere Zeit:
|
|
||||||
RUN apk add --no-cache ca-certificates tzdata && update-ca-certificates
|
RUN apk add --no-cache ca-certificates tzdata && update-ca-certificates
|
||||||
# Non-root User
|
|
||||||
RUN addgroup -S app && adduser -S -G app app
|
RUN addgroup -S app && adduser -S -G app app
|
||||||
USER app
|
USER app
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
VOLUME ["/data"] # hier hängt dein Mirror-Volume read-only
|
VOLUME ["/data"]
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
COPY --from=build /out/mirrorweb /mirrorweb
|
COPY --from=build /out/mirrorweb /mirrorweb
|
||||||
ENTRYPOINT ["/mirrorweb"]
|
ENTRYPOINT ["/mirrorweb"]
|
||||||
|
|||||||
10
compose.yml
10
compose.yml
@@ -16,15 +16,7 @@ services:
|
|||||||
- updater
|
- updater
|
||||||
volumes:
|
volumes:
|
||||||
- /docker/ubuntu-apt-mirror/data:/data
|
- /docker/ubuntu-apt-mirror/data:/data
|
||||||
command: >
|
command: -archive=/data/mirror/archive.ubuntu.com/ubuntu -security=/data/mirror/security.ubuntu.com/ubuntu -old=/data/mirror/old-releases.ubuntu.com/ubuntu -autoindex=true -cache=600 -addr=:8080 -trust-proxy=true -log-json=false
|
||||||
-archive=/data/mirror/archive.ubuntu.com/ubuntu
|
|
||||||
-security=/data/mirror/security.ubuntu.com/ubuntu
|
|
||||||
-old=/data/mirror/old-releases.ubuntu.com/ubuntu
|
|
||||||
-autoindex=true
|
|
||||||
-cache=600
|
|
||||||
-addr=:8080
|
|
||||||
-trust-proxy=true
|
|
||||||
-log-json=false # auf true setzen für JSON-Lines
|
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.http.routers.ubuntu_mirror.rule=Host(`ubuntu-24-04.send.nrw`)
|
- traefik.http.routers.ubuntu_mirror.rule=Host(`ubuntu-24-04.send.nrw`)
|
||||||
|
|||||||
Reference in New Issue
Block a user