Skip to content

Commit 1389772

Browse files
Modify azure cli to install through apt-get and pyaml to specific version supported by py2 (#15472)
Why I did it Current docker-sonic-mgmt build is broken. So below are two fixes which can help in mitigating the same. PYAML - Download a specific version in python2 as after https://pypi.org/project/pyaml/23.5.5/ there was support only for python3. This update happened on May 5th. And consequently all daily builds after this changes https://dev.azure.com/mssonic/build/_build/results?buildId=266733&view=results (starting build to break) kept failing Azure-CLI - this can be downloaded by apt-get repository. So modify as an improvement. Work item tracking Microsoft ADO (number only): [Build] fix docker-sonic-mgmt build #15567 How I did it By manually checking the release notes of pyaml and install azure-cli in newly installed docker container using apt-get How to verify it You can run below commands to validate: make configure PLATFORM=generic make target/docker-sonic-mgmt.gz Second line would fail without the commit.
1 parent 067ef67 commit 1389772

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

dockers/docker-sonic-mgmt/Dockerfile.j2

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ENV DEBIAN_FRONTEND=noninteractive
55

66
RUN apt-get update && apt-get install -y apt-transport-https \
77
apt-utils \
8+
azure-cli \
89
build-essential \
910
ca-certificates \
1011
cmake \
@@ -75,6 +76,7 @@ RUN pip install allure-pytest==2.8.22 \
7576
pexpect \
7677
prettytable \
7778
psutil \
79+
pyaml==21.10.1 \
7880
pyasn1==0.1.9 \
7981
pycryptodome==3.9.8 \
8082
pyfiglet \
@@ -130,9 +132,6 @@ RUN apt-get update \
130132
&& apt-get update \
131133
&& apt-get install -y docker-ce-cli
132134

133-
# Install Azure CLI
134-
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
135-
136135
## Copy and install sonic-mgmt docker dependencies
137136
COPY \
138137
{% for deb in docker_sonic_mgmt_debs.split(' ') -%}

0 commit comments

Comments
 (0)