dockerasp.net-coredocker-composedockerfiledocker-build

failed to compute cache key: "/dist" not found: not found


My Docker File -

FROM mcr.microsoft.com/dotnet/aspnet:3.1
ENV ASPNETCORE_URLS=http://*:5000
ENV ASPNETCORE_ENVIRONMENT="production"
EXPOSE  5000
WORKDIR /app
COPY  ./dist . 
ENTRYPOINT ["dotnet", "JustLogin.API.dll"]

The Image builds successfully via command prompt but when trying to run in it via visual studio it throws error and by docker desktop it doesn't shows any error but site still doesn't run


Solution

  • the dist folder location was inside child folder.But project was building by default for root path