From 0b848721786fcfdc4a78294533335f98f91be739 Mon Sep 17 00:00:00 2001 From: clawbot Date: Tue, 10 Feb 2026 18:09:24 -0800 Subject: [PATCH] Update Dockerfile for Go 1.24, no Node build step needed SPA is vanilla JS shipped as static files in web/dist/, no npm build step required. --- Dockerfile | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa626c5..4988f54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,15 @@ +# Build stage FROM golang:1.24-alpine AS builder - -RUN apk add --no-cache git - WORKDIR /src +RUN apk add --no-cache make COPY go.mod go.sum ./ RUN go mod download - COPY . . +RUN go build -o /chatd ./cmd/chatd/ +RUN go build -o /chat-cli ./cmd/chat-cli/ -ARG VERSION=dev -RUN go build -ldflags "-X main.Version=${VERSION}" -o /chatd ./cmd/chatd - -FROM alpine:3.21 - -RUN apk add --no-cache ca-certificates +# Final stage +FROM alpine:latest COPY --from=builder /chatd /usr/local/bin/chatd - -WORKDIR /data EXPOSE 8080 - -ENTRYPOINT ["chatd"] +CMD ["chatd"]