init
All checks were successful
release-tag / release-image (push) Successful in 1m34s

This commit is contained in:
2025-09-23 17:32:39 +02:00
parent 6b19b144ed
commit 34f7d5c171
4 changed files with 583 additions and 0 deletions

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
# --- Builder Stage ---
FROM golang:1.24-alpine AS builder
# Arbeitsverzeichnis
WORKDIR /app
# Go-Module laden
COPY go.mod ./
RUN go mod download
# Quellcode
COPY . .
# Binary bauen (statisch, kleiner)
RUN CGO_ENABLED=0 GOOS=linux go build -o subnetcalc .
# --- Runtime Stage ---
FROM alpine:3.22
WORKDIR /app
# Binary vom Builder kopieren
COPY --from=builder /app/subnetcalc .
# Exponiere Port für Webinterface
EXPOSE 8080
# Standardkommando: immer Web-Modus starten
ENTRYPOINT ["./subnetcalc", "-web", ":8080"]