11{% set prefix = DEFAULT_CONTAINER_REGISTRY %}
2- FROM {{ prefix }}ubuntu:18 .04
2+ FROM {{ prefix }}ubuntu:20 .04
33
44ENV DEBIAN_FRONTEND=noninteractive
55
@@ -21,8 +21,6 @@ RUN apt-get update && apt-get install -y build-essential \
2121 psmisc \
2222 python \
2323 python-dev \
24- python-scapy \
25- python-pip \
2624 python3-pip \
2725 python3-venv \
2826 rsyslog \
@@ -31,10 +29,16 @@ RUN apt-get update && apt-get install -y build-essential \
3129 sudo \
3230 tcpdump \
3331 telnet \
34- vim
32+ vim \
33+ python-is-python2 \
34+ software-properties-common
35+
36+ RUN add-apt-repository -y universe
37+ RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py \
38+ && python2 get-pip.py
3539
3640RUN pip install setuptools==44.1.1
37- RUN pip install cffi==1.10 .0 \
41+ RUN pip install cffi==1.12 .0 \
3842 contextlib2==0.6.0.post1 \
3943 cryptography==3.3.2 \
4044 "future>=0.16.0" \
@@ -96,7 +100,7 @@ RUN pip install cffi==1.10.0 \
96100 && rm -f 1.0.0.tar.gz \
97101 && pip install nnpy \
98102 && pip install dpkt \
99- && pip install scapy==2.4.5 --upgrade
103+ && pip install scapy==2.4.5 --upgrade --ignore-installed
100104
101105# Install docker-ce-cli
102106RUN apt-get update \
@@ -127,7 +131,7 @@ debs/{{ deb }}{{' '}}
127131{% - endfor -%}
128132debs/
129133
130- RUN dpkg -i \
134+ RUN dpkg --force-all - i \
131135{% for deb in docker_sonic_mgmt_debs .split (' ' ) -%}
132136debs/{{ deb }}{{' '}}
133137{% - endfor %}
@@ -193,8 +197,7 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
193197
194198ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONIOENCODING=UTF-8
195199
196- RUN python3 -m pip install --upgrade --ignore-installed pip setuptools==58.4.0
197-
200+ RUN python3 -m pip install --upgrade --ignore-installed pip setuptools==58.4.0 wheel==0.33.6
198201RUN python3 -m pip install setuptools-rust \
199202 aiohttp \
200203 defusedxml \
@@ -237,7 +240,6 @@ RUN python3 -m pip install setuptools-rust \
237240 tabulate \
238241 textfsm==1.1.2 \
239242 virtualenv \
240- wheel==0.33.6 \
241243 pysubnettree \
242244 nnpy \
243245 dpkt \
0 commit comments