Starts in:
2 DAYS
0 HR
53 MIN
32 SEC
Starts in:
2 D
0 H
53 M
32 S
Open Closed

Error Docker #2832


User avatar
0
berly created
  • ABP Framework version: v5.1.4

  • UI type: Blazor Wasm

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): no

  • Exception message and stack trace: Cannot use file stream for [/app/bin/Debug/net6.0/Docker.Blazor.deps.json]: No such file or directory A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/app/bin/Debug/net6.0/'. Failed to run as a self-contained app.

    • The application was run as a self-contained app because '/app/bin/Debug/net6.0/Docker.Blazor.runtimeconfig.json' was not found.
    • If this should be a framework-dependent app, add the '/app/bin/Debug/net6.0/Docker.Blazor.runtimeconfig.json' file and specify the appropriate framework.
  • Steps to reproduce the issue:" Create dockerfile and docker-compose

DOCKERFILE :

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["NuGet.Config", "."] COPY ["src/Docker.Blazor/Docker.Blazor.csproj", "src/Docker.Blazor/"] COPY ["src/Docker.HttpApi.Client/Docker.HttpApi.Client.csproj", "src/Docker.HttpApi.Client/"] COPY ["src/Docker.Application.Contracts/Docker.Application.Contracts.csproj", "src/Docker.Application.Contracts/"] COPY ["src/Docker.Domain.Shared/Docker.Domain.Shared.csproj", "src/Docker.Domain.Shared/"] RUN dotnet restore "src/Docker.Blazor/Docker.Blazor.csproj" COPY . . WORKDIR "/src/src/Docker.Blazor" RUN dotnet build "Docker.Blazor.csproj" -c Release -o /app/build

FROM build AS publish RUN dotnet publish "Docker.Blazor.csproj" -c Release -o /app/publish

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

docker-compose :

version: '3.4'

services: docker.blazor: image: ${DOCKER_REGISTRY-}dockerblazor build: context: . dockerfile: src/Docker.Blazor/Dockerfile


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can check this https://github.com/dotnet/sdk/issues/3935

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06