sonic-buildimage/dockers/docker-snmp-sv2
lguohan f4fdf310b9
[build] Fix the snmp docker build error. (#7452) (#7459)
* [build] Fix the snmp docker build error. (#7452)

Issue is get_pip.py is moved to pip 21.1 (https://github.com/pypa/get-pip/commits/main) which is not compatible with 3.6.
Issue of pip itself is fixed as part of 21.1.1 in pip community (pypa/pip#9835).
However get-pip.py is still not updated to latest pip. Also get.pip.py does not support python 3.6 version explicitly (pypa/get-pip#88)

Step 15/29 : RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6
 ---> Running in bece31f49267
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1891k  100 1891k    0     0  9564k      0 --:--:-- --:--:-- --:--:-- 9600k
Traceback (most recent call last):
  File "<stdin>", line 24298, in <module>
  File "<stdin>", line 139, in main
  File "<stdin>", line 115, in bootstrap
  File "<stdin>", line 96, in monkeypatch_for_cert
  File "/tmp/tmp5fnxrz0a/pip.zip/pip/_internal/commands/__init__.py", line 9, in <module>
  File "/tmp/tmp5fnxrz0a/pip.zip/pip/_internal/cli/base_command.py", line 12, in <module>
  File "/tmp/tmp5fnxrz0a/pip.zip/pip/_internal/cli/cmdoptions.py", line 30, in <module>
  File "/tmp/tmp5fnxrz0a/pip.zip/pip/_internal/utils/hashes.py", line 2, in <module>
ImportError: cannot import name 'NoReturn'
The command '/bin/sh -c curl https://bootstrap.pypa.io/get-pip.py | python3.6' returned a non-zero code: 1
How I did:

Got the file from https://github.com/pypa/get-pip/tree/21.0 and added to the buildimage
pin pip to the previous release 21.0.1. (Similar is done in other public repos eg: grpc/grpc-java#8115)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2021-04-28 23:08:26 -07:00
..
base_image_files [Services] Allow monit system tool to monitor the critical processes status running in various SONiC containers. (#3940) 2020-01-11 01:27:34 +00:00
Dockerfile.j2 [build] Fix the snmp docker build error. (#7452) (#7459) 2021-04-28 23:08:26 -07:00
get-pip.py [build] Fix the snmp docker build error. (#7452) (#7459) 2021-04-28 23:08:26 -07:00
snmpd.conf.j2 Revert "Remove snmpd hw_fsys module, remove disk monitoring which is not in use" (#1665) 2018-05-01 18:32:49 -07:00
start.sh Revert "[snmp] Configure snmp docker hostname from config DB (#2773)" (#4242) 2020-03-10 08:00:15 -07:00
supervisord.conf Wait 5 second before start/restart snmpd (#3427) 2019-09-10 07:26:50 -07:00
sysDescription.j2 [configdb] Migrate minigraph configurations to DB (#942) 2017-09-12 14:13:27 -07:00