File tree Expand file tree Collapse file tree 4 files changed +68
-0
lines changed
Expand file tree Collapse file tree 4 files changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ target
2+ Dockerfile
3+ .dockerignore
4+ .git
5+ .gitignore
Original file line number Diff line number Diff line change 1+ # Build image
2+ FROM ghcr.io/rust-lang/rust:nightly-bookworm as build
3+
4+ RUN apt-get update && \
5+ apt-get install -y build-essential \
6+ cmake \
7+ libpcre2-dev \
8+ protobuf-compiler
9+
10+ WORKDIR /usr/src/holo
11+ COPY .. .
12+ RUN cargo build --features zebra-8-4-compat --release
13+
14+ # Final base
15+ FROM debian:bookworm-slim
16+
17+ RUN apt-get update && \
18+ apt-get install -y frr \
19+ ifupdown \
20+ iputils-ping \
21+ less \
22+ tcpdump \
23+ && rm -rf /var/lib/apt/lists/*
24+
25+ RUN mkdir -p /var/run/holo
26+ RUN chown frr:frr /var/run/holo
27+
28+ # Define Bash aliases
29+ RUN echo "alias holo-cli-show='holo-cli -c \" show state xpath /ietf-routing:routing format json\" '" >> /root/.bashrc
30+ RUN echo "alias ipr='ip -4 ro ; ip -6 ro ; ip -M ro'" >> /root/.bashrc
31+
32+ COPY --from=build /usr/src/holo/holo-daemon/holod.toml /etc/holod.toml
33+ COPY --from=build /usr/src/holo/target/release/holod /usr/local/sbin/
34+ COPY --from=build /usr/src/holo/target/release/holo-cli /usr/local/sbin/
35+
36+ ENV RUST_BACKTRACE=1
37+ ENV RUST_LOG=holo=debug
38+
39+ COPY docker/docker-start /usr/src/docker-start
40+ CMD ["/usr/src/docker-start" ]
Original file line number Diff line number Diff line change 1+ # Docker
2+
3+ # Build
4+
5+ To build the Docker image, navigate to the parent directory and run the following command:
6+ ```
7+ docker build -t holo -f docker/Dockerfile .
8+ ```
9+
10+ # Running
11+
12+ To run the container in the background, use the following command:
13+ ```
14+ docker run -itd --privileged --name holo holo
15+ ```
16+
17+ To access Holo's CLI, use the following command:
18+ ```
19+ docker exec -it holo holo-cli
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ service frr start
4+ holod 2>> /tmp/holod.err
You can’t perform that action at this time.
0 commit comments