Files
zeekayandHanzo Dev ab107666e0 build: bump Go builder images to 1.26.5, set GOTOOLCHAIN=auto
Currency bump: golang builder images -> 1.26.5 (latest stable).

Adds ENV GOTOOLCHAIN=auto to each Go builder stage. The official golang
images set GOTOOLCHAIN=local, so a builder image older than the module's
go directive is a hard mid-build failure. The pin stays the hermetic fast
path; auto is the safety net for the next go.mod bump.

No go.mod go directive was changed. Builder images move; directives stay.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-01 16:28:19 -07:00

46 lines
839 B
Docker

# Build stage
FROM golang:1.26.5-alpine AS builder
ENV GOTOOLCHAIN=auto
# Install build dependencies
RUN apk add --no-cache git make gcc musl-dev linux-headers
# Set working directory
WORKDIR /build
# Copy go mod files
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
# Copy source code
COPY . .
# Build the CLI binary
RUN make build-cli
# Runtime stage
FROM alpine:latest
# Install runtime dependencies
RUN apk add --no-cache ca-certificates
# Create non-root user
RUN addgroup -g 1000 warp && \
adduser -u 1000 -G warp -s /bin/sh -D warp
# Copy binary from builder
COPY --from=builder /build/build/warp-cli /usr/local/bin/warp
# Set ownership
RUN chown -R warp:warp /usr/local/bin/warp
# Switch to non-root user
USER warp
# Set entrypoint
ENTRYPOINT ["warp"]
# Default command shows help
CMD ["--help"]