Here my Dockerfile:
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build WORKDIR /source COPY mytestapp-Production-MVC.sln . COPY mytestapp-Production-MVC/mytestapp-Production-MVC.csproj ./mytestapp-Production-MVC COPY mytestapp-Production-MVC/ ./ # copy everything else and build app # COPY mytestapp-Production-MVC/. ./source/mytestapp-Production-MVC WORKDIR /source/mytestapp-Production-MVC RUN dotnet restore RUN dotnet publish -c release -o /app --no-restore # final stage/image FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 WORKDIR /app COPY --from=build /app ./ EXPOSE 80 ENTRYPOINT ["dotnet", "mytestapp-Production-MVC.dll"]
I get the following ERROR:
mytestapp-production-mvc-live | 16:44:03 INFO Running: [/bin/sh -c dotnet restore] mytestapp-production-mvc-live | 16:44:46 error building image: error building stage: failed to execute command: starting command: fork/exec /bin/sh: not a directory auerdev-production-mvc-live | 16:44:46 exit status 1
I hope someone can help.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!