rtr client 开发
This commit is contained in:
24
deploy/client/Dockerfile
Normal file
24
deploy/client/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM rust:1.89-bookworm AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends clang libclang-dev pkg-config \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY src ./src
|
||||
|
||||
RUN cargo build --release --bin rtr_debug_client
|
||||
|
||||
FROM debian:bookworm-slim AS runtime
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /build/target/release/rtr_debug_client /usr/local/bin/rtr_debug_client
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/rtr_debug_client"]
|
||||
32
deploy/client/docker-compose.clients.yml
Normal file
32
deploy/client/docker-compose.clients.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
rtr-client-1:
|
||||
image: rpki-rtr-debug-client:latest
|
||||
network_mode: host
|
||||
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
|
||||
restart: unless-stopped
|
||||
|
||||
rtr-client-2:
|
||||
image: rpki-rtr-debug-client:latest
|
||||
network_mode: host
|
||||
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
|
||||
restart: unless-stopped
|
||||
|
||||
rtr-client-3:
|
||||
image: rpki-rtr-debug-client:latest
|
||||
network_mode: host
|
||||
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
|
||||
restart: unless-stopped
|
||||
|
||||
rtr-client-4:
|
||||
image: rpki-rtr-debug-client:latest
|
||||
network_mode: host
|
||||
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
|
||||
restart: unless-stopped
|
||||
|
||||
rtr-client-5:
|
||||
image: rpki-rtr-debug-client:latest
|
||||
network_mode: host
|
||||
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
|
||||
restart: unless-stopped
|
||||
11
deploy/client/docker-compose.yml
Normal file
11
deploy/client/docker-compose.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
rtr-debug-client:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: deploy/client/Dockerfile
|
||||
image: rpki-rtr-debug-client:latest
|
||||
network_mode: host
|
||||
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
|
||||
restart: unless-stopped
|
||||
stdin_open: true
|
||||
tty: true
|
||||
Reference in New Issue
Block a user