Skip to content

Commit dfa8a34

Browse files
authored
Install powershell/azure-cli from AzLinux native package feed (#1337)
1 parent ed6e5c8 commit dfa8a34

File tree

5 files changed

+16
-67
lines changed

5 files changed

+16
-67
lines changed

src/azurelinux/3.0/net10.0/crossdeps/amd64/Dockerfile

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,7 @@ RUN tdnf update -y && \
2626
python3-pip \
2727
# aspnetcore build dependencies
2828
nodejs \
29-
npm
30-
31-
# Powershell and azure cli aren't currently part of the azure linux 3.0 repositories.
32-
# Install powershell from the rhel8 MS repo, and azure-cli using PIP
33-
34-
# Install powershell from the Microsoft repository.
35-
RUN curl -sSL -O https://packages.microsoft.com/config/rhel/8/packages-microsoft-prod.rpm && \
36-
rpm -i packages-microsoft-prod.rpm && \
37-
rm -f packages-microsoft-prod.rpm && \
38-
tdnf update -y && \
39-
tdnf install -y --setopt tsflags=nodocs \
40-
powershell && \
41-
rm /etc/yum.repos.d/microsoft-prod.repo && \
42-
tdnf clean all
43-
44-
# Install azurecli from PIP
45-
RUN azureEnv="/usr/local/share/azure-cli-env" && \
46-
python3 -m venv "$azureEnv" && \
47-
"$azureEnv/bin/python" -m pip install --upgrade setuptools && \
48-
"$azureEnv/bin/python" -m pip install azure-cli && \
49-
ln -s "$azureEnv/bin/az" /usr/local/bin/az
29+
npm \
30+
# Provides functionality for AzureCLI AzDO task
31+
azure-cli \
32+
powershell

src/azurelinux/3.0/net8.0/crossdeps/amd64/Dockerfile

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,7 @@ RUN tdnf update -y && \
2424
python3-pip \
2525
# aspnetcore build dependencies
2626
nodejs \
27-
npm
28-
29-
# Powershell and azure cli aren't currently part of the azure linux 3.0 repositories.
30-
# Install powershell from the rhel8 MS repo, and azure-cli using PIP
31-
32-
# Install powershell from the Microsoft repository.
33-
RUN curl -sSL -O https://packages.microsoft.com/config/rhel/8/packages-microsoft-prod.rpm && \
34-
rpm -i packages-microsoft-prod.rpm && \
35-
rm -f packages-microsoft-prod.rpm && \
36-
tdnf update -y && \
37-
tdnf install -y --setopt tsflags=nodocs \
38-
powershell && \
39-
rm /etc/yum.repos.d/microsoft-prod.repo && \
40-
tdnf clean all
41-
42-
# Install azurecli from PIP
43-
RUN azureEnv="/usr/local/share/azure-cli-env" && \
44-
python3 -m venv "$azureEnv" && \
45-
"$azureEnv/bin/python" -m pip install --upgrade setuptools && \
46-
"$azureEnv/bin/python" -m pip install azure-cli && \
47-
ln -s "$azureEnv/bin/az" /usr/local/bin/az
27+
npm \
28+
# Provides functionality for AzureCLI AzDO task
29+
azure-cli \
30+
powershell

src/azurelinux/3.0/net9.0/crossdeps/amd64/Dockerfile

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,7 @@ RUN tdnf update -y && \
2626
python3-pip \
2727
# aspnetcore build dependencies
2828
nodejs \
29-
npm
30-
31-
# Powershell and azure cli aren't currently part of the azure linux 3.0 repositories.
32-
# Install powershell from the rhel8 MS repo, and azure-cli using PIP
33-
34-
# Install powershell from the Microsoft repository.
35-
RUN curl -sSL -O https://packages.microsoft.com/config/rhel/8/packages-microsoft-prod.rpm && \
36-
rpm -i packages-microsoft-prod.rpm && \
37-
rm -f packages-microsoft-prod.rpm && \
38-
tdnf update -y && \
39-
tdnf install -y --setopt tsflags=nodocs \
40-
powershell && \
41-
rm /etc/yum.repos.d/microsoft-prod.repo && \
42-
tdnf clean all
43-
44-
# Install azurecli from PIP
45-
RUN azureEnv="/usr/local/share/azure-cli-env" && \
46-
python3 -m venv "$azureEnv" && \
47-
"$azureEnv/bin/python" -m pip install --upgrade setuptools && \
48-
"$azureEnv/bin/python" -m pip install azure-cli && \
49-
ln -s "$azureEnv/bin/az" /usr/local/bin/az
29+
npm \
30+
# Provides functionality for AzureCLI AzDO task
31+
azure-cli \
32+
powershell

src/cbl-mariner/2.0/crossdeps/amd64/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ RUN tdnf update -y && \
2222
python3-pip \
2323
# diagnostics build dependency
2424
lldb-devel \
25-
# Provdies azure cli and powershell, used for common AzureCLI AzDO tasks
26-
powershell \
27-
azure-cli
25+
# Provides functionality for AzureCLI AzDO task
26+
azure-cli \
27+
powershell
2828

2929
# Validate checksums with keyring after https://github.com/microsoft/azurelinux/issues/3142 is resolved
3030
ENV NODE_VERSION=20.11.1

src/cbl-mariner/2.0/fpm/amd64/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN tdnf install -y \
1515
# Provides sudo
1616
sudo \
1717
# Provides functionality for AzureCLI AzDO task
18-
powershell \
1918
azure-cli \
19+
powershell \
2020
&& tdnf clean all \
2121
&& gem install fpm

0 commit comments

Comments
 (0)