From d28945987c228a7bf6b7b9af0cdc3729c5787c59 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Tue, 31 Mar 2020 08:50:57 +0800 Subject: [PATCH] [sonic-mgmt]: Support virtual environment for ansible 2.0.0.2 (#4325) . env-201811/bin/activate The ansible 2.0.0.2 will be used. --- dockers/docker-sonic-mgmt/Dockerfile.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2 index 662f781dc7..733f81be2c 100644 --- a/dockers/docker-sonic-mgmt/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt/Dockerfile.j2 @@ -53,6 +53,7 @@ RUN pip install ipaddr \ paramiko==2.1.2 \ passlib \ ipython==5.4.1 \ + virtualenv \ && git clone https://github.com/p4lang/scapy-vxlan.git \ && cd scapy-vxlan \ && python setup.py install \ @@ -147,4 +148,8 @@ RUN azure-cli_bundle_*/installer # 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-201803 +RUN env-201811/bin/pip install ansible==2.0.0.2 + RUN git clone https://github.com/Azure/sonic-mgmt