Docs: docker run on Ubuntu

Created on 14 Nov 2018  Â·  5Comments  Â·  Source: dotnet/docs

After following the steps and checking over them, as well as attempting subtle changes in an attempt to get it to work on my own, the final command does not work for me.

I get the following: No executable found matching command "dotnet-out/Hello.dll".

This is my first attempt at trying Docker so I won't be surprised if it is something I have done, was just looking for guidance as I don't see in the documents a step for remedying the issue.

For reference, my Docker version is 18.09.0 and dotnet --version is 2.1.5. If its useful, my Ubuntu is 18.04 as well.

Thank you for the guide either way though!


Document Details

âš  Do not edit this section. It is required for docs.microsoft.com âžź GitHub issue linking.

Area - .NET Core Guide Technology - Docker

All 5 comments

Ran into this as well, watch the casing on the “Hello.dll”. It has to match the casing of the folder name. If you named the folder “hello”, change dockerfile to “hello.dll”. File names/folder names are case sensitive in Linux.

The DLL will match the directory name where you ran dotnet new console (you can also use the -o <dirname> flag create the project in a sub folder with a name of your choosing). You can see what the DLL is called by running dotnet build then listing the DLLs in the bin folder, e.g.

Mac/Linux:

ls bin/Debug/netcoreapp2.1/*.dll

Windows:

dir bin\Debug\netcoreapp2.1\*.dll

In my case it's called hello-docker.dll because I created the project with the command: dotnet new console -o hello-docker, then ran cd hello-docker and dotnet build.

So for my case I would use ENTRYPOINT ["dotnet", "out/hello-docker.dll"] in myDockerfile`.

@clarenceb Thanks. It'd be awesome if they could update the doc to show that the name of the folder the user creates is important. I hit the same issue on OS X Mojave. Cheers.

I updated this article and it should make sense now. This should be published today.

Thanks @Thraka !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gmatv picture gmatv  Â·  3Comments

ite-klass picture ite-klass  Â·  3Comments

mekomlusa picture mekomlusa  Â·  3Comments

Manoj-Prabhakaran picture Manoj-Prabhakaran  Â·  3Comments

LJ9999 picture LJ9999  Â·  3Comments