45 lines
1.1 KiB
Docker
45 lines
1.1 KiB
Docker
FROM rust:1.89-bookworm AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
cmake \
|
|
pkg-config \
|
|
clang \
|
|
libclang-dev \
|
|
libssl-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY src ./src
|
|
|
|
RUN cargo build --release --bin rpki
|
|
|
|
FROM debian:bookworm-slim AS runtime
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ca-certificates supervisor \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /build/target/release/rpki /usr/local/bin/rpki
|
|
COPY deploy/server/supervisord.conf /etc/supervisor/conf.d/rpki-rtr.conf
|
|
|
|
RUN mkdir -p /app/data /app/rtr-db /app/certs /app/slurm /var/log/supervisor
|
|
|
|
ENV RPKI_RTR_ENABLE_TLS=false \
|
|
RPKI_RTR_TCP_ADDR=0.0.0.0:323 \
|
|
RPKI_RTR_TLS_ADDR=0.0.0.0:324 \
|
|
RPKI_RTR_DB_PATH=/app/rtr-db \
|
|
RPKI_RTR_CCR_DIR=/app/data \
|
|
RPKI_RTR_SLURM_DIR=/app/slurm \
|
|
RPKI_RTR_REFRESH_INTERVAL_SECS=300 \
|
|
RPKI_RTR_STRICT_CCR_VALIDATION=false
|
|
|
|
EXPOSE 323 324
|
|
|
|
CMD ["supervisord", "-n", "-c", "/etc/supervisor/conf.d/rpki-rtr.conf"]
|