Skip to content
Open
Changes from all 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
16 changes: 16 additions & 0 deletions src/ubuntu/22.04/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ubuntu.azurecr.io/ubuntu:22.04

ENV POWERSHELL_VERSION=7.6.1

# Install the base toolchain we need to build anything (clang, cmake, make and the like)
# this does not include libraries that we need to compile different projects, we'd like
# them in a different layer.
Expand Down Expand Up @@ -77,6 +79,20 @@ RUN apt-get update \
file \
&& rm -rf /var/lib/apt/lists/*

# Install PowerShell
RUN ARCH=$(dpkg --print-architecture) \
&& case "$ARCH" in \
amd64) ARCH="x64" ;; \
arm64) ARCH="arm64" ;; \
*) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
esac \
&& curl -L "https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${ARCH}.tar.gz" -o /tmp/powershell.tar.gz \
&& mkdir -p /opt/microsoft/powershell \
&& tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell \
&& chmod +x /opt/microsoft/powershell/pwsh \
&& ln -s /opt/microsoft/powershell/pwsh /usr/bin/pwsh \
&& rm -f /tmp/powershell.tar.gz

# Token used to authenticate to the dotnet-public-npm Azure Artifacts feed.
ARG NPM_TOKEN

Expand Down
Loading