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:
21
Dockerfile
21
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"]
|
||||
|
||||
Reference in New Issue
Block a user