Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions dockers/docker-ptf/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ RUN apt-get update \
# to ensure they use a patched Go stdlib (GO-2026-4337: crypto/tls)
{% if CONFIGURED_ARCH == "armhf" %}
RUN GO_ARCH=armv6l \
&& GO_SHA256=7d4f0d266d871301e08ef4ac31c56e66048688893b2848392e5c600276351ee8 \
&& GO_SHA256=39f168f158e693887d3ad006168af1b1a3007b19c5993cae4d9d57f82f52aaf8 \
{% elif CONFIGURED_ARCH == "arm64" %}
RUN GO_ARCH=arm64 \
&& GO_SHA256=ec342e7389b7f489564ed5463c63b16cf8040023dabc7861256677165a8c0e2b \
&& GO_SHA256=654da1f9b50a5d1c2a85ccf8ed405aa89c06e94d18384628bf186f7712677b08 \
{% else %}
RUN GO_ARCH=amd64 \
&& GO_SHA256=00859d7bd6defe8bf84d9db9e57b9a4467b2887c18cd93ae7460e713db774bc1 \
&& GO_SHA256=42d4f7a32316aa66591eca7e89867256057a4264451aca10570a715b3637ba70 \
{% endif %}
&& GO_VERSION=1.25.9 \
&& GO_VERSION=1.25.10 \
&& curl -L "https://go.dev/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz" -o /tmp/go.tar.gz \
&& echo "${GO_SHA256} /tmp/go.tar.gz" | sha256sum -c - \
&& tar -C /usr/local -xzf /tmp/go.tar.gz \
Expand Down Expand Up @@ -411,6 +411,18 @@ RUN cd gnxi \
# Deactivating a virtualenv.
# ENV PATH="$BACKUP_OF_PATH"

# Build gnmic from source at a pinned upstream main commit. Picks up the
# dependency fixes merged after v0.45.0 (grpc 1.79.3, otel-sdk 1.43.0,
# go-git 5.19.0, prometheus 0.311.3, etc.) that address the CVEs which
# forced removal in #27059. Temporary until the next tagged gnmic
# release ships.
RUN GNMIC_REV=653dc5dd4ddcd3bd4197317875a10c1ce8b06653 \
&& git clone https://github.com/openconfig/gnmic.git /tmp/gnmic \
&& cd /tmp/gnmic \
&& git checkout "${GNMIC_REV}" \
&& go build -o /usr/local/bin/gnmic . \
&& chmod +x /usr/local/bin/gnmic \
&& rm -rf /tmp/gnmic /root/go/pkg/mod /root/.cache/go-build

# Remove Go toolchain to reduce image size
RUN rm -rf /usr/local/go "$(go env GOPATH 2>/dev/null || echo $HOME/go)"
Expand Down
Loading