forked from AtlassianPS/JiraPS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
57 additions
and
483 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
# from: https://github.com/microsoft/vscode-dev-containers/blob/14b53bf68f467dc6fe1a1a378ba10b9db9e6d318/containers/dotnet/.devcontainer/Dockerfile | ||
# and: https://github.com/microsoft/vscode-dev-containers/blob/main/containers/powershell/.devcontainer/Dockerfile | ||
ARG VARIANT=8.0-bookworm-slim | ||
FROM mcr.microsoft.com/dotnet/sdk:${VARIANT} | ||
ENV PATH $PATH:/home/vscode/.dotnet:/home/vscode/.dotnet/tools | ||
|
||
ARG DOTNET_VARIANT=6.0-bullseye | ||
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${DOTNET_VARIANT} | ||
# 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= | ||
|
||
ARG INSTALL_ZSH="true" | ||
ARG UPGRADE_PACKAGES="true" | ||
# 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-0057 | ||
RUN if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ | ||
apt-get update && \ | ||
apt-get install -y wget && \ | ||
POWERSHELL_FILE_NAME="powershell_7.4.1-1.deb_amd64.deb" && \ | ||
wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/${POWERSHELL_FILE_NAME} && \ | ||
dpkg -i ${POWERSHELL_FILE_NAME} && \ | ||
apt-get install -f && \ | ||
rm ${POWERSHELL_FILE_NAME} ; \ | ||
fi | ||
|
||
# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies. | ||
ARG USERNAME=vscode | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
COPY library-scripts/*.sh /tmp/library-scripts/ | ||
RUN apt-get update \ | ||
&& /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \ | ||
&& chsh "${USERNAME}" -s "$(which pwsh)" \ | ||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts | ||
|
||
# Download the latest stable `nuget.exe` to `/usr/local/bin` | ||
RUN curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe | ||
RUN chmod +x /usr/local/bin/nuget.exe | ||
|
||
|
||
# [Optional] Uncomment this section to install additional packages. | ||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
# && apt-get -y install --no-install-recommends <your-package-list-here> | ||
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.1/powershell-7.4.1-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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.