From 8ed161fec71b58ab8123e341e0488f4a06f8064a Mon Sep 17 00:00:00 2001 From: Jon Goldberg <63672455+jon-nokia@users.noreply.github.com> Date: Wed, 3 Jan 2024 00:18:25 -0500 Subject: [PATCH] sonic-slave-bookworm/Dockerfile.j2 remove sudo (#17433) PROXY variables are not available to sudo users during docker build This patch fixes below error during builds using proxy: Step 57/63 : RUN sudo apt-get install python3-m2crypto ---> Running in ebfa797ebcf8 Reading package lists... Building dependency tree... Reading state information... Suggested packages: python-m2crypto-doc The following NEW packages will be installed: python3-m2crypto 0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded. Need to get 169 kB of archives. After this operation, 725 kB of additional disk space will be used. Ign:1 http://deb.debian.org/debian bookworm/main armhf python3-m2crypto armhf 0.38.0-4+b1 Ign:1 http://deb.debian.org/debian bookworm/main armhf python3-m2crypto armhf 0.38.0-4+b1 Ign:1 http://deb.debian.org/debian bookworm/main armhf python3-m2crypto armhf 0.38.0-4+b1 Err:1 http://deb.debian.org/debian bookworm/main armhf python3-m2crypto armhf 0.38.0-4+b1 Could not connect to debian.map.fastlydns.net:80 (146.75.78.132), connection timed out Unable to connect to deb.debian.org:http: E: Failed to fetch http://deb.debian.org/debian/pool/main/m/m2crypto/python3-m2crypto_0.38.0-4%2bb1_armhf.deb Could not connect to debian.map.fastlydns.net:80 (146.75.78.132), connection timed out Unable to connect to deb.debian.org:http: E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? --- sonic-slave-bookworm/Dockerfile.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonic-slave-bookworm/Dockerfile.j2 b/sonic-slave-bookworm/Dockerfile.j2 index ef29115b0e..60f3c0b981 100644 --- a/sonic-slave-bookworm/Dockerfile.j2 +++ b/sonic-slave-bookworm/Dockerfile.j2 @@ -556,7 +556,7 @@ RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs {{ DOCKER_EXTRA_OPTS RUN update-alternatives --set iptables /usr/sbin/iptables-legacy # Install m2crypto package, needed by SWI tools -RUN sudo apt-get install python3-m2crypto +RUN apt-get install python3-m2crypto # Install swi tools RUN pip3 install git+https://github.com/aristanetworks/swi-tools.git@bead66bf261770237f7dd21ace3774ba04a017e9