Add kontor-echo and kontor-fiber to kontor-pod

resolve #35

(cherry picked from commit 05e26e512da9c237adbb58510df2b490837cd836)
This commit is contained in:
2026-01-29 23:36:15 +01:00
parent dc577a9b55
commit 182d77354e
5 changed files with 60 additions and 15 deletions
+24
View File
@@ -0,0 +1,24 @@
# ---------- Stage 1: Build ----------
FROM docker.io/library/golang:1.25-alpine AS builder
# Set the working directory
WORKDIR /app
# Ensure a portable, static-ish binary
ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
# Copy and download dependencies
COPY go.mod go.sum ./
RUN go mod download
# Copy the source code
COPY . .
# Build the Go application (strip debug info for smaller size)
RUN go build -trimpath -ldflags="-s -w" -o kontor cmd/kontor/main.go
# ---------- Stage 2: Final ----------
FROM alpine:latest
# Set the working directory
WORKDIR /app
# Install runtime dependencies you actually need
RUN apk add --no-cache ca-certificates tzdata curl
# Copy the binary and set ownership
COPY --from=builder /app/kontor /app/kontor
# Set the entrypoint command
ENTRYPOINT ["/app/kontor"]