Dockerfile.orly raw

   1  # ORLY relay Dockerfile for negentropy interop testing
   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 orly relay binary (use vendored deps for local replace directives)
  11  RUN GOTOOLCHAIN=auto CGO_ENABLED=0 go build -mod=vendor -o orly .
  12  
  13  # Runtime image
  14  FROM alpine:3.19
  15  
  16  RUN apk add --no-cache ca-certificates curl jq
  17  
  18  WORKDIR /app
  19  COPY --from=builder /build/orly /app/
  20  
  21  RUN mkdir -p /data
  22  
  23  EXPOSE 3334
  24  
  25  ENV ORLY_PORT=3334
  26  ENV ORLY_DATA_DIR=/data
  27  ENV ORLY_LOG_LEVEL=info
  28  ENV ORLY_NEGENTROPY_ENABLED=true
  29  
  30  HEALTHCHECK --interval=5s --timeout=5s --start-period=10s --retries=3 \
  31    CMD curl -f http://localhost:3334 || exit 1
  32  
  33  CMD ["/app/orly"]
  34