You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
679 B
35 lines
679 B
# 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}"]
|
|
|