Skip to content

Commit 605b28f

Browse files
authored
Merge pull request #73 from XenitAB/hotfix/azcli_versioning
hotfix/azCLI static version
2 parents 3399425 + 0c53cb6 commit 605b28f

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

docker/Dockerfile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,31 @@ RUN mkdir -p /work
2222

2323
# Install dependencies
2424
RUN apt-get update && apt-get install -y --no-install-recommends \
25+
apt-transport-https \
26+
apt-utils \
2527
ca-certificates \
2628
curl \
2729
git \
2830
make \
2931
openssl \
3032
unzip \
3133
gpg \
34+
gnupg \
35+
lsb-release \
3236
wget \
3337
jq \
3438
yq && \
35-
rm -rf /var/lib/apt/lists/*
39+
rm -rf /var/lib/apt/lists/* && \
40+
mkdir -p /etc/apt/keyrings
3641

3742
# Install Azure CLI
38-
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
43+
RUN AZ_CLI_VERSION="2.73.0" && \
44+
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/keyrings/microsoft.gpg && \
45+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" \
46+
> /etc/apt/sources.list.d/azure-cli.list && \
47+
apt-get update && \
48+
apt-get install -y --no-install-recommends azure-cli=${AZ_CLI_VERSION}-1~$(lsb_release -cs) && \
49+
rm -rf /var/lib/apt/lists/*
3950

4051
# Install Terraform
4152
RUN TERRAFORM_VERSION="1.11.4" && \

0 commit comments

Comments
 (0)