Skip to content

Commit 9f5a96e

Browse files
ryanzhu706Copilotyxieca
authored
Download and enable grpcurl in ptf docker. (#24587)
Added grpcurl binary to PTF Docker containers to enable gRPC testing capabilities for SONiC test framework. This supports upcoming gNOI (gRPC Network Operations Interface) testing infrastructure that requires a lightweight gRPC client tool. Background: SONiC is moving towards gRPC-based management interfaces (gNMI, gNOI, gNSI) Current test framework lacks unified gRPC testing capabilities grpcurl provides a simple, dependency-free solution for gRPC operations Eliminates need for protocol buffer compilation in test environments Co-authored-by: Copilot <[email protected]> Co-authored-by: Ying Xie <[email protected]>
1 parent 7c759ca commit 9f5a96e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

dockers/docker-ptf/Dockerfile.j2

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,23 @@ RUN apt-get update \
9797
iptables \
9898
wireshark-common \
9999
freeradius \
100-
quilt
100+
quilt \
101+
{% if CONFIGURED_ARCH == "armhf" %}
102+
&& GRPCURL_ARCH=linux_armv6 \
103+
{% elif CONFIGURED_ARCH == "arm64" %}
104+
&& GRPCURL_ARCH=linux_arm64 \
105+
{% else %}
106+
&& GRPCURL_ARCH=linux_x86_64 \
107+
{% endif %}
108+
&& GRPCURL_VERSION=1.9.1 && \
109+
curl -L "https://github.com/fullstorydev/grpcurl/releases/download/v${GRPCURL_VERSION}/grpcurl_${GRPCURL_VERSION}_${GRPCURL_ARCH}.tar.gz" \
110+
-o /tmp/grpcurl_${GRPCURL_VERSION}_${GRPCURL_ARCH}.tar.gz && \
111+
cd /tmp && \
112+
tar xvf grpcurl_${GRPCURL_VERSION}_${GRPCURL_ARCH}.tar.gz && \
113+
mv grpcurl /usr/local/bin/grpcurl && \
114+
chmod +x /usr/local/bin/grpcurl && \
115+
rm -f /tmp/grpcurl_${GRPCURL_VERSION}_${GRPCURL_ARCH}.tar.gz && \
116+
rm -rf /var/lib/apt/lists/*
101117

102118
{% if PTF_ENV_PY_VER == "py3" %}
103119
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1 \

0 commit comments

Comments
 (0)