From 47c5ea07a3121031190afdd67cbb9edf6ca5bb3c Mon Sep 17 00:00:00 2001 From: skidoodle Date: Sat, 10 Jan 2026 21:07:35 +0100 Subject: [PATCH] dockerrrrr --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9c1f4e5..8e926b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,22 @@ FROM ghcr.io/a-h/templ:latest AS generate-stage -COPY . /app +COPY --chown=65532:65532 . /app WORKDIR /app RUN ["templ", "generate"] FROM golang:alpine AS build-stage +RUN apk add --no-cache ca-certificates WORKDIR /app COPY --from=generate-stage /app /app -RUN CGO_ENABLED=0 go build -o iphistory . + +RUN CGO_ENABLED=0 go build \ + -buildvcs=false \ + -ldflags="-s -w" \ + -o iphistory . FROM alpine:latest RUN apk --no-cache add ca-certificates WORKDIR /app/ COPY --from=build-stage /app/iphistory . + EXPOSE 8080 CMD ["./iphistory"]