Files
warp/Dockerfile
zeekay 7d1f4bada5 deps: bump Go to 1.26.4 across go.mod, Dockerfiles, GH Actions
Workspace-wide sync. luxfi/node already shipped on 1.26.4 in v1.30.6
(commit 121aca1fa9); this is the cross-repo catch-up.
2026-06-07 10:45:49 -07:00

45 lines
818 B
Docker

# Build stage
FROM golang:1.26.4-alpine AS builder
# 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"]