Files
corona/Dockerfile
T
zeekayandHanzo Dev 5c5a781f45 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:27:04 -07:00

43 lines
755 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
# Set working directory
WORKDIR /app
# Copy go mod files
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
# Copy source code
COPY . .
# Build the application
RUN make build
# Runtime stage
FROM alpine:latest
# Install runtime dependencies
RUN apk add --no-cache ca-certificates
# Create non-root user
RUN addgroup -g 1000 corona && \
adduser -D -u 1000 -G corona corona
# Copy binary from builder
COPY --from=builder /app/bin/corona /usr/local/bin/corona
# Switch to non-root user
USER corona
# Set entrypoint
ENTRYPOINT ["corona"]
# Default command (local simulation)
CMD ["l", "0", "0"]