Files
next.orly.dev/Dockerfile.relay-tester

36 lines
679 B
Docker

# Dockerfile for relay-tester
FROM golang:1.21-alpine AS builder
# Install build dependencies
RUN apk add --no-cache git
# Set working directory
WORKDIR /build
# Copy go mod files
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY . .
# Build the relay-tester binary
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o relay-tester ./cmd/relay-tester
# Runtime stage
FROM alpine:latest
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY --from=builder /build/relay-tester /app/relay-tester
# Default relay URL (can be overridden)
ENV RELAY_URL=ws://orly:3334
# Run the relay tester
ENTRYPOINT ["/app/relay-tester"]
CMD ["-url", "${RELAY_URL}"]