Update Dockerfile
This commit is contained in:
parent
37d3c5e0e2
commit
6edb14311e
1 changed files with 5 additions and 5 deletions
10
Dockerfile
10
Dockerfile
|
|
@ -3,19 +3,19 @@ FROM golang:1.25.7 AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Force Go to use the public proxy
|
||||||
|
ENV GOPROXY=https://proxy.golang.org,direct
|
||||||
|
|
||||||
# Copy everything
|
# Copy everything
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Force proxy
|
# Clean up and fetch dependencies
|
||||||
ENV GOPROXY=https://proxy.golang.org,direct
|
|
||||||
|
|
||||||
# Fetch deps
|
|
||||||
RUN go mod tidy
|
RUN go mod tidy
|
||||||
|
|
||||||
# Build binary from cmd/picoclaw
|
# Build binary from cmd/picoclaw
|
||||||
RUN go build -tags netgo -ldflags "-s -w" -o app ./cmd/picoclaw
|
RUN go build -tags netgo -ldflags "-s -w" -o app ./cmd/picoclaw
|
||||||
|
|
||||||
# Final stage
|
# Final stage: minimal runtime image
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/app .
|
COPY --from=builder /app/app .
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue