Files
flod-ipv64-parser/Dockerfile
jbergner 56ebcd9d4c
All checks were successful
release-tag / release-image (push) Successful in 1m35s
Changed Dockerfile to support persistance
2025-06-16 22:34:48 +02:00

26 lines
558 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -------- Dockerfile (Multi-Stage Build) --------
# 1. Builder-Stage
FROM golang:1.24-alpine AS builder
WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /bin/ipblock-api
# 2. Runtime-Stage
FROM alpine:3.20
# HTTPS-Callouts in Alpine brauchen ca-certificates
RUN apk add --no-cache ca-certificates
RUN mkdir /lists
COPY --from=builder /bin/ipblock-api /bin/ipblock-api
COPY ./lists /lists
# Default listens on :8080 siehe main.go
EXPOSE 8080
VOLUME /lists
ENTRYPOINT ["/bin/ipblock-api"]