Dockerfile.test-runner raw
1 # Test Runner Dockerfile with event generator, orly CLI, and test tools
2
3 FROM golang:1.24-alpine AS builder
4
5 RUN apk add --no-cache git make
6
7 WORKDIR /build
8 COPY . .
9
10 # Build event generator as a static binary (use vendored deps for local replace directives)
11 RUN GOTOOLCHAIN=auto CGO_ENABLED=0 go build -mod=vendor -ldflags='-extldflags=-static' -o event-generator ./tests/negentropy/event-generator
12
13 # Build unified orly CLI for sync testing (includes "orly sync" subcommand)
14 RUN GOTOOLCHAIN=auto CGO_ENABLED=0 go build -mod=vendor -o orly ./cmd/orly
15
16 # Runtime image
17 FROM alpine:3.21
18
19 RUN apk add --no-cache ca-certificates curl jq bash
20
21 # Install websocat binary
22 RUN curl -L -o /usr/local/bin/websocat https://github.com/vi/websocat/releases/download/v1.13.0/websocat.x86_64-unknown-linux-musl && \
23 chmod +x /usr/local/bin/websocat
24
25 # Copy event-generator and orly binaries
26 COPY --from=builder /build/event-generator /usr/local/bin/
27 COPY --from=builder /build/orly /usr/local/bin/
28
29 CMD ["bash"]
30