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

Problems installing libmsquic for dotnet 8 docker image #74

Closed WhatzGames closed 1 year ago

WhatzGames commented 1 year ago

Describe the issue Trying to build a docker image based on aspnet:8-preivew failed when following steps to install libmsquic.

When did the issue occur?

I tried to install libmsquic from the debian 12 repo according to the docs

Steps to Reproduce

Have the following docker file

FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview AS base
RUN apt-get update && apt-get install curl -y --no-install-recommends
RUN curl -sSL https://packages.microsoft.com/config/debian/12/prod.list | tee /etc/apt/sources.list.d/microsoft-prod.list
RUN curl -sSL https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
RUN dpkg -i packages-microsoft-prod.deb
RUN rm packages-microsoft-prod.deb
RUN apt-get update && apt-get install libmsquic -y --no-install-recommends
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:8.0-preview AS build
WORKDIR /src
COPY ["API/API.csproj", "API/"]
RUN dotnet restore "API/API.csproj"
COPY . .
WORKDIR "/src/API"
RUN dotnet build "API.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "API.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "API.dll"]

And built the image

Actual Result grafik

Expected Result some sort of success status

Additional context

daviddavis commented 1 year ago

It looks like there's a step missing in the docs to download packages-microsoft-prod.deb. I've opened a PR to fix this:

https://github.com/MicrosoftDocs/linux/pull/11

That said though, I don't see any libmsquic package in the debian 12 repo:

https://packages.microsoft.com/debian/12/prod/pool/main/

It does appear in the debian 11 repo:

https://packages.microsoft.com/debian/11/prod/pool/main/libm/libmsquic/

I'm guessing the msquic team hasn't built it yet for debian 12. I recommend filing an issue for them at https://github.com/microsoft/msquic/issues.