Skip to content

Commit e783d45

Browse files
[Dotnet] - Fix build errors while installing powershell (#957)
1 parent 3bd6af8 commit e783d45

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/dotnet/.devcontainer/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ ENV NUGET_XMLDOC_MODE=
1010
# They are installed by the base image (mcr.microsoft.com/dotnet/sdk) which does not have the patch.
1111
# https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-0057
1212
RUN apt-get update && \
13-
wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell_7.4.1-1.deb_amd64.deb && \
14-
dpkg -i powershell_7.4.1-1.deb_amd64.deb && \
13+
apt-get install -y wget && \
14+
ARCHITECTURE=$(dpkg --print-architecture) && \
15+
POWERSHELL_FILE_NAME="powershell_7.4.1-1.deb_${ARCHITECTURE}.deb" && \
16+
wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/${POWERSHELL_FILE_NAME} && \
17+
dpkg -i ${POWERSHELL_FILE_NAME} && \
1518
apt-get install -f && \
16-
rm powershell_7.4.1-1.deb_amd64.deb
19+
rm ${POWERSHELL_FILE_NAME}

0 commit comments

Comments
 (0)