Skip to content

Commit

Permalink
sonic-slave-bookworm/Dockerfile.j2 remove sudo (sonic-net#17433)
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
jon-nokia authored and xumia committed Jan 4, 2024
1 parent 0bc5afe commit 3c76dce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sonic-slave-bookworm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c76dce

Please sign in to comment.