Debian 78b6afbe37
Some checks failed
CI - 4NK_node / Code Quality (push) Failing after 29s
CI - 4NK_node / Unit Tests (push) Failing after 29s
CI - 4NK_node / Integration Tests (push) Failing after 12s
CI - 4NK_node / Security Tests (push) Failing after 30s
CI - 4NK_node / Docker Build & Test (push) Failing after 10s
CI - 4NK_node / Documentation Tests (push) Failing after 3s
CI - 4NK_node / Security Audit (push) Successful in 3s
CI - 4NK_node / Release Guard (push) Has been skipped
CI - 4NK_node / Performance Tests (push) Successful in 27s
CI - 4NK_node / Notify (push) Failing after 2s
CI - 4NK_node / Publish Release (push) Has been skipped
fix: Centralize configuration and fix relay services - Mount config files to correct paths (/home/bitcoin/.conf) - Update docker-compose.yml with 3 separate relay services - Fix Dockerfiles for relay modules - Centralize all configs in 4NK_node/conf/
2025-09-03 19:06:37 +00:00

47 lines
970 B
Docker

FROM rust:1.75-alpine AS builder
# Install build dependencies
RUN apk add --no-cache musl-dev openssl-dev
# Set working directory
WORKDIR /app
# Copy source code
COPY . .
# Build the application
RUN cargo build --release
# Runtime stage
FROM alpine:latest
# Install runtime dependencies
RUN apk add --no-cache libgcc
# Create app user
RUN addgroup -g 1001 appuser && adduser -D -s /bin/sh -u 1001 -G appuser appuser
# Set working directory
WORKDIR /app
# Copy binary from builder
COPY --from=builder /app/target/release/sdk_relay /usr/local/bin/sdk_relay
# Configuration file will be mounted via docker-compose
# Set permissions
RUN chown -R appuser:appuser /app
# Switch to app user
USER appuser
# Expose ports
EXPOSE 8090 8091
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD wget --quiet --tries=1 --timeout=5 --spider http://localhost:8091 || exit 1
# Run the application
CMD ["/usr/local/bin/sdk_relay"]