Docker Community Forums

Share and learn in the Docker community.

Container exists imemdiately with an error

Guys ,
trying to create an image for very simple mvc core app . however container exits immediately with this error .

Did you mean to run dotnet SDK commands? Please install dotnet SDK from:

Docker file:
FROM microsoft/aspnetcore:1.1.1

COPY dist /app


EXPOSE 80/tcp

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
—> 51d6c2e2970c
Step 2/5 : COPY dist /app
—> 0cd2a978f10f
Step 3/5 : WORKDIR /app
Removing intermediate container 7120bc31040c
—> e4a361fdb93e
Step 4/5 : EXPOSE 80/tcp
—> Running in 67fdac0656bc
Removing intermediate container 67fdac0656bc
—> 9cb7d03e79b0
Step 5/5 : ENTRYPOINT [“dotnet”, “ExampleApp.dll”]
—> Running in 29b587a65976
Removing intermediate container 29b587a65976
—> 3c399db8ab8f
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?

issue was the case of entrypoint dll

I am facing the same issue. What did you do to by pass the issue ??

1 Like

I got the exact same error when I missed the dotnet publish command for my docker container before pushing to Kubernetes container. In short, it can’t find the build entrypoint or project dll to run.