From 5d828db5ebd4807e53ef1953cdd4373246a69dc8 Mon Sep 17 00:00:00 2001 From: Joe Clarke Date: Wed, 2 Sep 2026 19:30:30 -0400 Subject: [PATCH 1/2] feat: Switch to using a compiled yanglint (#11668) The Debian packages lag the release of libyang and its yanglint and yangre tools. Switch to using a multi-stage Dockerfile to build libyang from source based on a release tag. Copy the compiled artifacts into the base runtime image. This should satisfy the needs of the IETF community that need to do validation of modern features like structure augments, YANG Semver, etc. ``` IMAGE ID DISK USAGE CONTENT SIZE EXTRA datatracker-base:latest 781197738c76 2.19GB 2.19GB ``` ``` root@105c0a75f01d:/workspace# yanglint YANGLINT[W]: Configuration directory "/root/.yanglint" does not exist, creating it. YANGLINT[W]: No saved history. > root@105c0a75f01d:/workspace# yanglint --version yanglint 5.8.6 ``` Co-authored-by: Joe Clarke --- docker/base.Dockerfile | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile index 7caba501d7..1692a58dad 100644 --- a/docker/base.Dockerfile +++ b/docker/base.Dockerfile @@ -1,3 +1,31 @@ +FROM debian:trixie AS builder + +# Update to the desired release tag +ARG LIBYANG_TAG=v5.8.6 + +# Build-time dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ + cmake \ + build-essential \ + pkg-config \ + ca-certificates \ + libpcre2-dev \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /src +RUN git clone --branch ${LIBYANG_TAG} --depth 1 \ + https://github.com/CESNET/libyang.git libyang + +WORKDIR /src/libyang/build +RUN cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/opt/libyang \ + -DBUILD_SHARED_LIBS=ON \ + .. \ + && make -j"$(nproc)" \ + && make install + FROM python:3.12-trixie LABEL maintainer="IETF Tools Team " @@ -9,6 +37,13 @@ RUN apt-get update \ && apt-get -qy upgrade \ && apt-get -y install --no-install-recommends dialog 2>&1 +COPY --from=builder /opt/libyang /opt/libyang + +RUN echo /opt/libyang/lib > /etc/ld.so.conf.d/libyang.conf \ + && ldconfig \ + && ln -s /opt/libyang/bin/yanglint /usr/bin/yanglint \ + && ln -s /opt/libyang/bin/yangre /usr/bin/yangre + # Add Node.js Source RUN apt-get install -y --no-install-recommends ca-certificates curl gnupg \ && mkdir -p /etc/apt/keyrings \ @@ -59,7 +94,6 @@ RUN apt-get update --fix-missing && apt-get install -qy --no-install-recommends libmagic-dev \ libmariadb-dev \ libmemcached-tools \ - libyang3-tools \ locales \ make \ mariadb-client \ From e17b6ad8127c86f38eafeb984e62a7c961eab57e Mon Sep 17 00:00:00 2001 From: jennifer-richards <19472766+jennifer-richards@users.noreply.github.com> Date: Wed, 2 Sep 2026 23:48:13 +0000 Subject: [PATCH 2/2] ci: update base image target version to 20260902T2330 --- dev/build/Dockerfile | 2 +- dev/build/TARGET_BASE | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/build/Dockerfile b/dev/build/Dockerfile index 7f6c7453b2..774e985af7 100644 --- a/dev/build/Dockerfile +++ b/dev/build/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/ietf-tools/datatracker-app-base:20260827T1454 +FROM ghcr.io/ietf-tools/datatracker-app-base:20260902T2330 LABEL maintainer="IETF Tools Team " ENV DEBIAN_FRONTEND=noninteractive diff --git a/dev/build/TARGET_BASE b/dev/build/TARGET_BASE index d5d96a8f32..dcaab2d6d7 100644 --- a/dev/build/TARGET_BASE +++ b/dev/build/TARGET_BASE @@ -1 +1 @@ -20260827T1454 +20260902T2330