From 4db31c8f43e62923ce895b85e84110a0708462a8 Mon Sep 17 00:00:00 2001 From: Paul Wekesa Date: Wed, 16 Oct 2024 14:52:52 +0300 Subject: [PATCH] docker: add cli YANG modules location to docker Add /usr/local/share/holo-cli/modules to the Dockerfile to ensure YANG location exists when running the container. Signed-off-by: Paul Wekesa --- docker/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3cc79753..c42d7bbc 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,7 @@ # Build image # ============================================================================== -FROM ghcr.io/rust-lang/rust:nightly-bookworm as build +FROM ghcr.io/rust-lang/rust:nightly-bookworm AS build RUN apt-get update && \ apt-get install -y build-essential \ @@ -40,6 +40,9 @@ RUN useradd --system --shell /sbin/nologin --home-dir /var/run/holo/ -g holo hol RUN mkdir -p /var/run/holo RUN chown holo:holo /var/run/holo +# /usr/local/share/holo-cli/modules is where holo-cli will store its modules +RUN mkdir -p /usr/local/share/holo-cli/modules + RUN echo "alias holo-cli-show='holo-cli -c \"show state xpath /ietf-routing:routing format json\"'" >> /root/.bashrc RUN echo "alias ipr='ip -4 ro ; ip -6 ro ; ip -M ro'" >> /root/.bashrc