Some checks failed
Build and Push Docker Image / build (push) Failing after 7s
Features: - NIP-86 management API with NIP-98 authentication - Dual mode operation: blacklist (default) or allowlist mode - BoltDB storage for events and management data - Negentropy sync support - Docker deployment ready
32 lines
558 B
Docker
32 lines
558 B
Docker
FROM golang:1.25-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy go mod and sum files
|
|
COPY go.mod go.sum ./
|
|
|
|
# Download dependencies
|
|
RUN go mod download
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build the application
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/standard-86-relay .
|
|
|
|
# Start a new stage from scratch
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /root/
|
|
|
|
# Copy the binary from the builder stage
|
|
COPY --from=builder /app/standard-86-relay .
|
|
|
|
# Create data directory
|
|
RUN mkdir -p /data
|
|
|
|
# Expose port 3334
|
|
EXPOSE 3334
|
|
|
|
# Command to run the executable
|
|
CMD ["./standard-86-relay"]
|