Skip to content

Commit

Permalink
remove powershell from Pulumi devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
craddm committed Oct 4, 2023
1 parent f597bea commit dd9ad38
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .devcontainer/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand All @@ -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

0 comments on commit dd9ad38

Please sign in to comment.