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.
This commit is contained in:
clawbot
2026-02-10 18:09:24 -08:00
parent 1f54b281fd
commit 0b84872178

View File

@@ -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"]