Skip to content

Commit 7869666

Browse files
daallsanthosh-kt
authored andcommitted
[mgmt] Upgrade sonic-mgmt container to stretch (sonic-net#5397)
- Bump sonic-mgmt version to 18.04 - Update installation methods - Add virtualenv for python3 Signed-off-by: Danny Allen <[email protected]>
1 parent a06386e commit 7869666

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

dockers/docker-sonic-mgmt/Dockerfile.j2

+9-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:18.04
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

@@ -20,6 +20,9 @@ RUN apt-get update && apt-get install -y build-essential \
2020
python-dev \
2121
python-scapy \
2222
python-setuptools \
23+
python-pip \
24+
python3-pip \
25+
python3-venv \
2326
rsyslog \
2427
snmp \
2528
sshpass \
@@ -28,8 +31,6 @@ RUN apt-get update && apt-get install -y build-essential \
2831
telnet \
2932
vim
3033

31-
RUN easy_install pip==20.1.1
32-
3334
RUN pip install cffi==1.10.0 \
3435
"cryptography>=2.5" \
3536
"future>=0.16.0" \
@@ -156,19 +157,15 @@ USER $user
156157

157158
# Install Azure CLI
158159
WORKDIR /var/$user
159-
RUN curl -L https://aka.ms/InstallAzureCliBundled -o azure-cli_bundle.tar.gz
160-
RUN tar -xvzf azure-cli_bundle.tar.gz
161-
RUN azure-cli_bundle_*/installer
162-
163-
# Known bug: azure keyvault cannot work behind a proxy
164-
# Temporary fix: upgrade the azure-keyvault package within az cli
165-
# TODO: if azure-cli contains newer version azure-keyvault, remove this
166-
RUN ~/lib/azure-cli/bin/python -m pip install azure-keyvault==0.3.7 -U
160+
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
167161

168-
# Install Virtual Environment
162+
# Install Virtual Environments
169163
RUN python -m virtualenv --system-site-packages env-201811
170164
RUN env-201811/bin/pip install ansible==2.0.0.2
171165

166+
RUN python3 -m venv env-python3
167+
RUN env-python3/bin/pip3 install azure-kusto-data azure-kusto-ingest defusedxml pytest
168+
172169
# NOTE: There is an ordering dependency for pycryptodome. Leaving this at
173170
# the end until we figure that out.
174171
RUN pip install pycryptodome==3.9.8

0 commit comments

Comments
 (0)