初始化 Panda RPKI v0.1.0 开源候选版本
This commit is contained in:
22
docker/Dockerfile
Normal file
22
docker/Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM rust:1.92-bookworm AS build
|
||||
WORKDIR /src
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends clang libclang-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
RUN mkdir src && printf 'fn main() {}\n' > src/main.rs && cargo build --locked --release
|
||||
COPY src ./src
|
||||
RUN touch src/main.rs src/lib.rs && cargo build --locked --release
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates rsync time \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& useradd --system --create-home --home-dir /var/lib/panda-rpki panda
|
||||
COPY --from=build /src/target/release/panda-rpki /usr/local/bin/panda-rpki
|
||||
COPY LICENSE /usr/share/licenses/panda-rpki/LICENSE
|
||||
COPY THIRD_PARTY_NOTICES.md /usr/share/licenses/panda-rpki/THIRD_PARTY_NOTICES.md
|
||||
COPY docs/third-party-licenses.txt /usr/share/licenses/panda-rpki/docs/third-party-licenses.txt
|
||||
USER panda
|
||||
ENTRYPOINT ["/usr/local/bin/panda-rpki"]
|
||||
CMD ["--help"]
|
||||
62
docker/compose.all5.yaml
Normal file
62
docker/compose.all5.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
services:
|
||||
validator:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
image: panda-rpki:v0.1.0
|
||||
user: "${PUID:-1000}:${PGID:-1000}"
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
volumes:
|
||||
- ${INPUT_DIR:?set INPUT_DIR to the TAL/TA directory}:/input:ro
|
||||
- ${OUTPUT_DIR:?set OUTPUT_DIR to a writable output directory}:/output
|
||||
- ${STATE_DIR:?set STATE_DIR to a writable state directory}:/state
|
||||
command:
|
||||
- validate
|
||||
- --tal
|
||||
- /input/${AFRINIC_TAL_FILE:?set AFRINIC_TAL_FILE}
|
||||
- --ta
|
||||
- /input/${AFRINIC_TA_FILE:?set AFRINIC_TA_FILE}
|
||||
- --tal-id
|
||||
- afrinic
|
||||
- --tal
|
||||
- /input/${APNIC_TAL_FILE:?set APNIC_TAL_FILE}
|
||||
- --ta
|
||||
- /input/${APNIC_TA_FILE:?set APNIC_TA_FILE}
|
||||
- --tal-id
|
||||
- apnic
|
||||
- --tal
|
||||
- /input/${ARIN_TAL_FILE:?set ARIN_TAL_FILE}
|
||||
- --ta
|
||||
- /input/${ARIN_TA_FILE:?set ARIN_TA_FILE}
|
||||
- --tal-id
|
||||
- arin
|
||||
- --tal
|
||||
- /input/${LACNIC_TAL_FILE:?set LACNIC_TAL_FILE}
|
||||
- --ta
|
||||
- /input/${LACNIC_TA_FILE:?set LACNIC_TA_FILE}
|
||||
- --tal-id
|
||||
- lacnic
|
||||
- --tal
|
||||
- /input/${RIPE_TAL_FILE:?set RIPE_TAL_FILE}
|
||||
- --ta
|
||||
- /input/${RIPE_TA_FILE:?set RIPE_TA_FILE}
|
||||
- --tal-id
|
||||
- ripe
|
||||
- --parallel-phase2-object-workers
|
||||
- "${PANDA_RPKI_WORKERS:-8}"
|
||||
- --parallel-max-repo-sync-workers-global
|
||||
- "${PANDA_RPKI_REPO_WORKERS:-8}"
|
||||
- --parallel-phase2-worker-queue-capacity
|
||||
- "${PANDA_RPKI_WORKER_QUEUE_CAPACITY:-256}"
|
||||
- --rrdp-state-dir
|
||||
- /state
|
||||
- --rrdp-sync-mode
|
||||
- "${PANDA_RPKI_RRDP_SYNC_MODE:-auto}"
|
||||
- --http-timeout-secs
|
||||
- "${PANDA_RPKI_HTTP_TIMEOUT_SECS:-600}"
|
||||
- --ccr-out
|
||||
- /output/all5.ccr
|
||||
- --out
|
||||
- /output
|
||||
40
docker/compose.daemon.yaml
Normal file
40
docker/compose.daemon.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
services:
|
||||
validator:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
image: panda-rpki:v0.1.0
|
||||
user: "${PUID:-1000}:${PGID:-1000}"
|
||||
read_only: true
|
||||
init: true
|
||||
restart: unless-stopped
|
||||
stop_grace_period: 40s
|
||||
tmpfs:
|
||||
- /tmp
|
||||
volumes:
|
||||
- ${INPUT_DIR:?set INPUT_DIR to the TAL/TA directory}:/input:ro
|
||||
- ${DAEMON_DIR:?set DAEMON_DIR to a writable dedicated directory}:/data
|
||||
environment:
|
||||
PANDA_RPKI_LOG_LEVEL: "${PANDA_RPKI_LOG_LEVEL:-info}"
|
||||
PANDA_RPKI_LOG_FORMAT: "${PANDA_RPKI_LOG_FORMAT:-json}"
|
||||
command:
|
||||
- daemon
|
||||
- --state-root
|
||||
- /data
|
||||
- --interval-secs
|
||||
- "${PANDA_RPKI_INTERVAL_SECS:-60}"
|
||||
- --retain-runs
|
||||
- "${PANDA_RPKI_RETAIN_RUNS:-10}"
|
||||
- --run-timeout-secs
|
||||
- "${PANDA_RPKI_RUN_TIMEOUT_SECS:-0}"
|
||||
- --shutdown-grace-secs
|
||||
- "30"
|
||||
- --
|
||||
- --tal
|
||||
- /input/${TAL_FILE:?set TAL_FILE}
|
||||
- --ta
|
||||
- /input/${TA_FILE:?set TA_FILE}
|
||||
- --parallel-max-repo-sync-workers-global
|
||||
- "${PANDA_RPKI_REPO_WORKERS:-8}"
|
||||
- --parallel-phase2-object-workers
|
||||
- "${PANDA_RPKI_WORKERS:-8}"
|
||||
28
docker/compose.yaml
Normal file
28
docker/compose.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
services:
|
||||
validator:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
image: panda-rpki:v0.1.0
|
||||
user: "${PUID:-1000}:${PGID:-1000}"
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
volumes:
|
||||
- ${INPUT_DIR:?set INPUT_DIR to the TAL/TA directory}:/input:ro
|
||||
- ${OUTPUT_DIR:?set OUTPUT_DIR to a writable output directory}:/output
|
||||
- ${STATE_DIR:?set STATE_DIR to a writable state directory}:/state
|
||||
command:
|
||||
- validate
|
||||
- --tal
|
||||
- /input/${TAL_FILE:?set TAL_FILE}
|
||||
- --ta
|
||||
- /input/${TA_FILE:?set TA_FILE}
|
||||
- --rrdp-state-dir
|
||||
- /state
|
||||
- --rrdp-sync-mode
|
||||
- "${PANDA_RPKI_RRDP_SYNC_MODE:-auto}"
|
||||
- --ccr-out
|
||||
- /output/result.ccr
|
||||
- --out
|
||||
- /output
|
||||
Reference in New Issue
Block a user