diff --git a/.devcontainer/python/Dockerfile b/.devcontainer/python/Dockerfile index 69476a8654..a28ef01333 100644 --- a/.devcontainer/python/Dockerfile +++ b/.devcontainer/python/Dockerfile @@ -3,7 +3,6 @@ FROM python:${VARIANT}-buster # Set package versions ARG AZURE_CLI_VERSION="2.42.0" -ARG PWSH_VERSION="7.3.6" ARG PULUMI_VERSION="3.80.0" RUN apt-get update \ @@ -23,21 +22,6 @@ ARG TARGETARCH RUN pip3 install azure-cli==${AZURE_CLI_VERSION} RUN pip3 install hatch -# Install Powershell -# Pull different binaries from Github depending on system architecture -# The standard APT method currently only works for `amd64` - RUN if [ "${TARGETARCH}" = "arm64" ]; \ - then \ - DEBARCH="arm64"; \ - else \ - DEBARCH="x86"; \ - fi; \ - curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v${PWSH_VERSION}/powershell-${PWSH_VERSION}-linux-$DEBARCH.tar.gz \ - && mkdir -p /opt/microsoft/powershell/7 \ - && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ - && chmod +x /opt/microsoft/powershell/7/pwsh \ - && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh - # Create non-root user and give them sudo access ARG USERNAME=deploydsh ARG USER_UID=1000 @@ -56,12 +40,5 @@ USER $USERNAME COPY ./docs/requirements.txt /build/requirements.txt RUN pip3 install -r /build/requirements.txt -# Install/check needed powershell modules -COPY ./deployment/CheckRequirements.ps1 /build/CheckRequirements.ps1 -COPY ./deployment/common/Logging.psm1 /build/common/Logging.psm1 -RUN pwsh -Command "& {Set-PSRepository -Name PSGallery -InstallationPolicy Trusted}" \ - && pwsh -File /build/CheckRequirements.ps1 -InstallMissing \ - && sudo rm -rf /build/ - # Set PATH for pulumi - pulumi installed as feature to work round installing as root ENV PATH=$PATH:/home/${USERNAME}/.pulumi/bin