microsoft / linux-package-repositories

Microsoft Packaged Linux Software (DEBs, RPMs, etc) are hosted on packages.microsoft.com (PMC) made available as native Linux repositories for use with package managers like APT, YUM, etc.
https://packages.microsoft.com
MIT License
64 stars 17 forks source link

Cannot install powershell in docker ubuntu 24.04 image #141

Closed 0x00000oak closed 2 months ago

0x00000oak commented 2 months ago

Describe the issue Unable to install powershell in ubuntu 22.04 docker image following the instructions for ubuntu from Microsoft at https://learn.microsoft.com/en-us/powershell/scripting/install/install-ubuntu?view=powershell-7.4#installation-via-package-repository-the-package-repository

If applicable, what package did you attempt to install, and from which repo? powershell, packages-microsoft-prod

Steps to Reproduce

FROM ubuntu:24.04 AS build

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
    apt-get upgrade -y

# Install dotnet
RUN apt-get install -y \
    dotnet-sdk-8.0

# Install prerequisites for powershell
RUN apt-get install -y \
    wget \
    apt-transport-https \
    software-properties-common

# Install powershell
RUN wget -q https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb && \
    dpkg -i packages-microsoft-prod.deb && \
    rm packages-microsoft-prod.deb && \
    apt-get update && \
    apt-get install -y \
    powershell

Actual Result powershell package is not installed. Instead, exit code 100 is returned and apt-get saying: E: Unable to locate package powershell

Expected Result powershell package should be installed

daviddavis commented 2 months ago

The issue is being tracked here: https://github.com/PowerShell/PowerShell/issues/21385