Files
zeekay ba01baa778 ci: give the moved jobs the toolchain they assume
First real runs on this fleet turned up three things the workflows had been
getting for free from GitHub's hosted image.

golangci-lint had no setup-go step. The linter shells out to `go` to load
packages, and the job image does not carry a toolchain on PATH, so it exited on
"go command required, not found" without reading a file. It sets up Go from
go.mod now, like every other job here.

doctests ran setup-go before checkout, so go.mod was not on disk when the action
looked for it and the module cache degraded to a permanent miss. Checkout goes
first.

The e2e proxy builder was pinned to golang:1.24-alpine while go.mod requires
1.26.4. The official golang images set GOTOOLCHAIN=local, which makes the image
the authority and refuses a newer directive, so `go mod download` stopped the
compose build and took both docker.start and docker.e2e.start with it. The base
moves up to 1.26-alpine; the version stays declared in exactly one place, go.mod,
with the image as its floor.

govulncheck is reporting three standard-library advisories against this module.
That is a real finding and it stays visible.
2026-08-13 21:24:19 -07:00

44 lines
873 B
Docker

# Build stage
FROM golang:1.26-alpine AS builder
WORKDIR /build
# Copy go mod files
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY . .
# Build the proxy-fi-server binary
RUN cd maintnotifications/e2e/cmd/proxy-fi-server && \
CGO_ENABLED=0 GOOS=linux go build -o /proxy-fi-server .
# Runtime stage
FROM alpine:latest
RUN apk --no-cache add ca-certificates
# Create a non-root user
RUN addgroup -g 1000 appuser && \
adduser -D -u 1000 -G appuser appuser
WORKDIR /app
# Copy the binary from builder
COPY --from=builder /proxy-fi-server .
# Change ownership of the app directory
RUN chown -R appuser:appuser /app
# Switch to non-root user
USER appuser
# Expose the fault injector API port
EXPOSE 5000
# Run the server
ENTRYPOINT ["/app/proxy-fi-server"]
CMD ["--listen", "0.0.0.0:5000", "--proxy-api-url", "http://cae-resp-proxy:3000"]