From 7bdc5045b2b70d889b0b5d0b6c40804cd7c87406 Mon Sep 17 00:00:00 2001 From: Kristofer Hallin Date: Wed, 4 May 2022 07:55:24 -0700 Subject: [PATCH] In come cases we need YANG files which are converted from SNMP MIBs using smidump. For the Docker images we'll clone the from an external repository. --- docker/main/Dockerfile.native | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/main/Dockerfile.native b/docker/main/Dockerfile.native index 5aa23198..40d0de22 100644 --- a/docker/main/Dockerfile.native +++ b/docker/main/Dockerfile.native @@ -91,7 +91,7 @@ WORKDIR /clixon/clixon COPY clixon . # Configure, build and install clixon -RUN ./configure --prefix=/clixon/build --with-cligen=/clixon/build --with-restconf=native --enable-nghttp2 --enable-http1 --with-yang-standard-dir=/usr/local/share/yang/standard --enable-netsnmp +RUN ./configure --prefix=/clixon/build --with-cligen=/clixon/build --with-restconf=native --enable-nghttp2 --enable-http1 --with-yang-standard-dir=/usr/local/share/yang/standard --enable-netsnmp --with-mib-generated-yang-dir=/usr/local/share/mib-yangs/ RUN make RUN make install @@ -119,6 +119,9 @@ WORKDIR /clixon COPY startsystem_native.sh startsystem.sh RUN install startsystem.sh /clixon/build/bin/ +# Add our generated YANG files +RUN git clone https://github.com/clicon/mib-yangs.git /usr/local/share/mib-yangs + # # Stage 2 # The second step skips the development environment and builds a runtime system @@ -153,6 +156,7 @@ COPY --from=0 /clixon/build/ /usr/local/ COPY --from=0 /usr/local/share/yang/* /usr/local/share/yang/standard/ COPY --from=0 /usr/local/share/yang/* /usr/local/share/yang/experimental/ COPY --from=0 /usr/local/share/openconfig/* /usr/local/share/openconfig/ +COPY --from=0 /usr/local/share/mib-yangs/* /usr/local/share/mib-yangs/ # Start the backend and restconf deamons CMD /usr/local/bin/startsystem.sh