Update Dockerfile
This commit is contained in:
parent
b1a9296147
commit
37d3c5e0e2
1 changed files with 8 additions and 1 deletions
|
|
@ -1,14 +1,21 @@
|
||||||
|
# Build stage
|
||||||
FROM golang:1.25.7 AS builder
|
FROM golang:1.25.7 AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy everything
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Force Go proxy
|
# Force proxy
|
||||||
ENV GOPROXY=https://proxy.golang.org,direct
|
ENV GOPROXY=https://proxy.golang.org,direct
|
||||||
|
|
||||||
|
# Fetch deps
|
||||||
RUN go mod tidy
|
RUN go mod tidy
|
||||||
|
|
||||||
|
# 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
|
||||||
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