Skip to content

Commit 1995540

Browse files
authored
Upgrade docker-sonic-mgmt base image from Ubuntu18.04 to 20.04 (sonic-net#12056)
Upgrade docker-sonic-mgmt base image from Ubuntu18.04 to 20.04
1 parent 60c80ad commit 1995540

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

dockers/docker-sonic-mgmt/Dockerfile.j2

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set prefix = DEFAULT_CONTAINER_REGISTRY %}
2-
FROM {{ prefix }}ubuntu:18.04
2+
FROM {{ prefix }}ubuntu:20.04
33

44
ENV 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,20 @@ 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
39+
40+
RUN curl -L http://archive.ubuntu.com/ubuntu/pool/universe/s/scapy/python-scapy_2.3.3-3_all.deb \
41+
--output python-scapy_2.3.3-3_all.deb \
42+
&& dpkg -i python-scapy_2.3.3-3_all.deb
3543

3644
RUN pip install setuptools==44.1.1
37-
RUN pip install cffi==1.10.0 \
45+
RUN pip install cffi==1.12.0 \
3846
contextlib2==0.6.0.post1 \
3947
cryptography==3.3.2 \
4048
"future>=0.16.0" \
@@ -96,7 +104,7 @@ RUN pip install cffi==1.10.0 \
96104
&& rm -f 1.0.0.tar.gz \
97105
&& pip install nnpy \
98106
&& pip install dpkt \
99-
&& pip install scapy==2.4.5 --upgrade
107+
&& pip install scapy==2.4.5 --upgrade --ignore-installed
100108

101109
# Install docker-ce-cli
102110
RUN apt-get update \
@@ -189,8 +197,7 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
189197

190198
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONIOENCODING=UTF-8
191199

192-
RUN python3 -m pip install --upgrade --ignore-installed pip setuptools==58.4.0
193-
200+
RUN python3 -m pip install --upgrade --ignore-installed pip setuptools==58.4.0 wheel==0.33.6
194201
RUN python3 -m pip install setuptools-rust \
195202
aiohttp \
196203
defusedxml \
@@ -206,6 +213,7 @@ RUN python3 -m pip install setuptools-rust \
206213
ixnetwork-restpy==1.0.64 \
207214
ixnetwork-open-traffic-generator==0.0.79 \
208215
snappi[ixnetwork,convergence]==0.7.44 \
216+
markupsafe==2.0.1 \
209217
jinja2==2.7.2 \
210218
jsonpatch \
211219
lxml \
@@ -233,7 +241,6 @@ RUN python3 -m pip install setuptools-rust \
233241
tabulate \
234242
textfsm==1.1.2 \
235243
virtualenv \
236-
wheel==0.33.6 \
237244
pysubnettree \
238245
nnpy \
239246
dpkt \
@@ -248,5 +255,5 @@ RUN python3 -m pip install setuptools-rust \
248255
celery[redis]==4.4.7 \
249256
msrest==0.6.21
250257

251-
# Deactivating a virtualenv.
258+
# Deactivating a virtualenv
252259
ENV PATH="$BACKUP_OF_PATH"

0 commit comments

Comments
 (0)