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

Install PowerShell from Azure Linux repo #1269

Open
mthalman opened this issue Nov 22, 2024 · 0 comments
Open

Install PowerShell from Azure Linux repo #1269

mthalman opened this issue Nov 22, 2024 · 0 comments

Comments

@mthalman
Copy link
Member

mthalman commented Nov 22, 2024

There are several instances of Azure Linux / CBL Mariner Dockerfiles installing PowerShell from PMC:

# Powershell and azure cli aren't currently part of the azure linux 3.0 repositories.
# Install powershell from the rhel8 MS repo, and azure-cli using PIP
# Install powershell from the Microsoft repository.
RUN curl -sSL -O https://packages.microsoft.com/config/rhel/8/packages-microsoft-prod.rpm && \
rpm -i packages-microsoft-prod.rpm && \
rm -f packages-microsoft-prod.rpm && \
tdnf update -y && \
tdnf install -y --setopt tsflags=nodocs \
powershell && \
rm /etc/yum.repos.d/microsoft-prod.repo && \
tdnf clean all

These can be updated to simply install from the official Azure Linux repo. In other words, this works:

docker run --rm mcr.microsoft.com/azurelinux/base/core:3.0 tdnf install -y powershell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Current Release
Development

No branches or pull requests

2 participants