Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dotnet] - Support noble distro and remove stale powershell security patch #1158

Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 1 addition & 26 deletions src/dotnet/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,4 @@ ENV PATH $PATH:/home/vscode/.dotnet:/home/vscode/.dotnet/tools

# clear this environment variable so xml docs from NuGet packages are unpackaged. The default dotnet/sdk image sets it to 'skip'.
# see https://github.com/dotnet/dotnet-docker/issues/2790
ENV NUGET_XMLDOC_MODE=

# Temporary: Upgrade packages due to mentioned CVEs
# They are installed by the base image (mcr.microsoft.com/dotnet/sdk) which does not have the patch.
# https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-30045
gauravsaini04 marked this conversation as resolved.
Show resolved Hide resolved
RUN if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
apt-get update && \
apt-get install -y wget && \
POWERSHELL_FILE_NAME="powershell_7.4.4-1.deb_amd64.deb" && \
wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.4/${POWERSHELL_FILE_NAME} && \
dpkg -i ${POWERSHELL_FILE_NAME} && \
apt-get install -f && \
rm ${POWERSHELL_FILE_NAME} ; \
fi

RUN if [ "$(dpkg --print-architecture)" = "arm64" ]; then \
apt-get update && \
apt-get install -y curl tar && \
POWERSHELL_FILE_PATH="/opt/microsoft/powershell/7" && \
curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v7.4.4/powershell-7.4.4-linux-arm64.tar.gz && \
mkdir -p ${POWERSHELL_FILE_PATH} && \
tar zxf /tmp/powershell.tar.gz -C ${POWERSHELL_FILE_PATH} && \
chmod +x ${POWERSHELL_FILE_PATH}/pwsh && \
ln -snf ${POWERSHELL_FILE_PATH}/pwsh /usr/bin/pwsh && \
rm /tmp/powershell.tar.gz ; \
fi
ENV NUGET_XMLDOC_MODE=
2 changes: 0 additions & 2 deletions src/dotnet/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "true",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "true"
},
"ghcr.io/devcontainers/features/node:1": {
Expand Down
Loading