Update Dockerfile

This commit is contained in:
izaac49 2026-02-12 21:29:27 +07:00 committed by GitHub
parent 2f5421fa41
commit b1a9296147
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,19 +1,14 @@
# Build stage
FROM golang:1.25.7 AS builder
WORKDIR /app
# Copy go.mod and go.sum first for dependency caching
COPY go.mod go.sum ./
RUN go mod download
# Copy the rest of the source code
COPY . .
# Build the binary from cmd/picoclaw
# Force Go proxy
ENV GOPROXY=https://proxy.golang.org,direct
RUN go mod tidy
RUN go build -tags netgo -ldflags "-s -w" -o app ./cmd/picoclaw
# Final stage: minimal runtime image
FROM debian:bookworm-slim
WORKDIR /app
COPY --from=builder /app/app .