[mgmt] Upgrade sonic-mgmt container to stretch (#5397)
- Bump sonic-mgmt version to 18.04 - Update installation methods - Add virtualenv for python3 Signed-off-by: Danny Allen <daall@microsoft.com>
This commit is contained in:
parent
7515aea9db
commit
2868a27935
@ -1,4 +1,4 @@
|
|||||||
FROM ubuntu:16.04
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
@ -20,6 +20,9 @@ RUN apt-get update && apt-get install -y build-essential \
|
|||||||
python-dev \
|
python-dev \
|
||||||
python-scapy \
|
python-scapy \
|
||||||
python-setuptools \
|
python-setuptools \
|
||||||
|
python-pip \
|
||||||
|
python3-pip \
|
||||||
|
python3-venv \
|
||||||
rsyslog \
|
rsyslog \
|
||||||
snmp \
|
snmp \
|
||||||
sshpass \
|
sshpass \
|
||||||
@ -28,8 +31,6 @@ RUN apt-get update && apt-get install -y build-essential \
|
|||||||
telnet \
|
telnet \
|
||||||
vim
|
vim
|
||||||
|
|
||||||
RUN easy_install pip==20.1.1
|
|
||||||
|
|
||||||
RUN pip install cffi==1.10.0 \
|
RUN pip install cffi==1.10.0 \
|
||||||
"cryptography>=2.5" \
|
"cryptography>=2.5" \
|
||||||
"future>=0.16.0" \
|
"future>=0.16.0" \
|
||||||
@ -156,19 +157,15 @@ USER $user
|
|||||||
|
|
||||||
# Install Azure CLI
|
# Install Azure CLI
|
||||||
WORKDIR /var/$user
|
WORKDIR /var/$user
|
||||||
RUN curl -L https://aka.ms/InstallAzureCliBundled -o azure-cli_bundle.tar.gz
|
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
|
||||||
RUN tar -xvzf azure-cli_bundle.tar.gz
|
|
||||||
RUN azure-cli_bundle_*/installer
|
|
||||||
|
|
||||||
# Known bug: azure keyvault cannot work behind a proxy
|
# Install Virtual Environments
|
||||||
# Temporary fix: upgrade the azure-keyvault package within az cli
|
|
||||||
# TODO: if azure-cli contains newer version azure-keyvault, remove this
|
|
||||||
RUN ~/lib/azure-cli/bin/python -m pip install azure-keyvault==0.3.7 -U
|
|
||||||
|
|
||||||
# Install Virtual Environment
|
|
||||||
RUN python -m virtualenv --system-site-packages env-201811
|
RUN python -m virtualenv --system-site-packages env-201811
|
||||||
RUN env-201811/bin/pip install ansible==2.0.0.2
|
RUN env-201811/bin/pip install ansible==2.0.0.2
|
||||||
|
|
||||||
|
RUN python3 -m venv env-python3
|
||||||
|
RUN env-python3/bin/pip3 install azure-kusto-data azure-kusto-ingest defusedxml pytest
|
||||||
|
|
||||||
# NOTE: There is an ordering dependency for pycryptodome. Leaving this at
|
# NOTE: There is an ordering dependency for pycryptodome. Leaving this at
|
||||||
# the end until we figure that out.
|
# the end until we figure that out.
|
||||||
RUN pip install pycryptodome==3.9.8
|
RUN pip install pycryptodome==3.9.8
|
||||||
|
Reference in New Issue
Block a user