diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2 index 1275a21c5af2..42aaa3525a64 100755 --- a/dockers/docker-sonic-mgmt/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt/Dockerfile.j2 @@ -1,5 +1,5 @@ {% set prefix = DEFAULT_CONTAINER_REGISTRY %} -FROM {{ prefix }}ubuntu:20.04 +FROM {{ prefix }}ubuntu:18.04 ENV DEBIAN_FRONTEND=noninteractive @@ -21,6 +21,8 @@ RUN apt-get update && apt-get install -y build-essential \ psmisc \ python \ python-dev \ + python-scapy \ + python-pip \ python3-pip \ python3-venv \ rsyslog \ @@ -29,16 +31,10 @@ RUN apt-get update && apt-get install -y build-essential \ sudo \ tcpdump \ telnet \ - vim \ - python-is-python2 \ - software-properties-common - -RUN add-apt-repository -y universe -RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py \ - && python2 get-pip.py + vim RUN pip install setuptools==44.1.1 -RUN pip install cffi==1.12.0 \ +RUN pip install cffi==1.10.0 \ contextlib2==0.6.0.post1 \ cryptography==3.3.2 \ "future>=0.16.0" \ @@ -100,7 +96,7 @@ RUN pip install cffi==1.12.0 \ && rm -f 1.0.0.tar.gz \ && pip install nnpy \ && pip install dpkt \ - && pip install scapy==2.4.5 --upgrade --ignore-installed + && pip install scapy==2.4.5 --upgrade # Install docker-ce-cli RUN apt-get update \ @@ -131,7 +127,7 @@ debs/{{ deb }}{{' '}} {%- endfor -%} debs/ -RUN dpkg --force-all -i \ +RUN dpkg -i \ {% for deb in docker_sonic_mgmt_debs.split(' ') -%} debs/{{ deb }}{{' '}} {%- endfor %} @@ -197,7 +193,8 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH" ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONIOENCODING=UTF-8 -RUN python3 -m pip install --upgrade --ignore-installed pip setuptools==58.4.0 wheel==0.33.6 +RUN python3 -m pip install --upgrade --ignore-installed pip setuptools==58.4.0 + RUN python3 -m pip install setuptools-rust \ aiohttp \ defusedxml \ @@ -240,6 +237,7 @@ RUN python3 -m pip install setuptools-rust \ tabulate \ textfsm==1.1.2 \ virtualenv \ + wheel==0.33.6 \ pysubnettree \ nnpy \ dpkt \