trying to create an image for very simple asp.net mvc core app . however container exits immediately with this error .
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
COPY dist /app
ENTRYPOINT [“dotnet”, “ExampleApp.dll”]
this mvc project is built using .net core 1.1 . i checked in csproj properties
dist folders exists and there is a dll with this name exampleapp.dll . its in lower case unlike my docker file . i tried changing case in docker file to match with exactly dll name case . did not help
docker image creation messages are below -
C:\ExampleApp>docker build . -t apress/exampleapp -f dockerfile
Sending build context to Docker daemon 32.62MB
Step 1/5 : FROM microsoft/aspnetcore:1.1.1
Step 2/5 : COPY dist /app
Step 3/5 : WORKDIR /app
Removing intermediate container 7120bc31040c
Step 4/5 : EXPOSE 80/tcp
—> Running in 67fdac0656bc
Removing intermediate container 67fdac0656bc
Step 5/5 : ENTRYPOINT [“dotnet”, “ExampleApp.dll”]
—> Running in 29b587a65976
Removing intermediate container 29b587a65976
Successfully built 3c399db8ab8f
Successfully tagged apress/exampleapp:latest
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have ‘-rwxr-xr-x’ permissions. It is recommended to double check and reset permissions for sensitive files and directories.
ofcourse if i run application from visual studio it compiles and works fine .
any input why container exits out imemdiatley?