Skip to content

Commit 8d5feda

Browse files
authored
Install powershell and azcli on fedora 39 and 40 (#1140)
1 parent b228049 commit 8d5feda

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

src/fedora/39/amd64/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,23 @@ RUN dnf config-manager --add-repo https://packages.microsoft.com/fedora/39/prod/
2525

2626
# Install tools used by build automation.
2727
RUN dnf --setopt=install_weak_deps=False install -y \
28+
azure-cli \
2829
git \
30+
jq \
2931
tar \
3032
procps \
3133
zip \
3234
&& dnf clean all
3335

36+
# Install the latest non-preview powershell release.
37+
RUN LATEST_TAG=$(curl -L https://api.github.com/repos/powershell/powershell/releases/latest | jq -r '.tag_name') \
38+
&& curl -L https://github.com/PowerShell/PowerShell/releases/download/$LATEST_TAG/powershell-${LATEST_TAG#*v}-linux-x64.tar.gz -o /tmp/powershell.tar.gz \
39+
&& mkdir -p /opt/microsoft/powershell \
40+
&& tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell \
41+
&& chmod +x /opt/microsoft/powershell/pwsh \
42+
&& ln -s /opt/microsoft/powershell/pwsh /usr/bin/pwsh \
43+
&& rm -f /tmp/powershell.tar.gz
44+
3445
# Dependencies of CoreCLR, Mono and CoreFX.
3546
RUN dnf --setopt=install_weak_deps=False install -y \
3647
autoconf \
@@ -67,4 +78,4 @@ RUN dnf --setopt=install_weak_deps=False install -y \
6778
RUN cd ~ && \
6879
curl -sL https://rpm.nodesource.com/setup_20.x
6980
RUN dnf install -y nodejs && dnf clean all
70-
ENV NO_UPDATE_NOTIFIER=true
81+
ENV NO_UPDATE_NOTIFIER=true

src/fedora/40/amd64/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,29 @@ RUN dnf --setopt=install_weak_deps=False install -y \
1919

2020
# Add MS package repo.
2121
COPY microsoft.asc /tmp
22-
RUN dnf config-manager --add-repo https://packages.microsoft.com/fedora/39/prod/ && \
22+
RUN dnf config-manager --add-repo https://packages.microsoft.com/fedora/40/prod/ && \
2323
rpm --import /tmp/microsoft.asc && \
2424
rm /tmp/microsoft.asc
2525

2626
# Install tools used by build automation.
2727
RUN dnf --setopt=install_weak_deps=False install -y \
28+
azure-cli \
2829
git \
30+
jq \
2931
tar \
3032
procps \
3133
zip \
3234
&& dnf clean all
3335

36+
# Install the latest non-preview powershell release.
37+
RUN LATEST_TAG=$(curl -L https://api.github.com/repos/powershell/powershell/releases/latest | jq -r '.tag_name') \
38+
&& curl -L https://github.com/PowerShell/PowerShell/releases/download/$LATEST_TAG/powershell-${LATEST_TAG#*v}-linux-x64.tar.gz -o /tmp/powershell.tar.gz \
39+
&& mkdir -p /opt/microsoft/powershell \
40+
&& tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell \
41+
&& chmod +x /opt/microsoft/powershell/pwsh \
42+
&& ln -s /opt/microsoft/powershell/pwsh /usr/bin/pwsh \
43+
&& rm -f /tmp/powershell.tar.gz
44+
3445
# Dependencies of CoreCLR, Mono and CoreFX.
3546
RUN dnf --setopt=install_weak_deps=False install -y \
3647
autoconf \

0 commit comments

Comments
 (0)