Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run dotnet 1.1 using docker

I'm trying to run an .NET Core app on my mac. I'm using VS Core and upgraded the project to .NET 1.1. Everything works fine when I run it through VSCode however when I get to run it using Docker it fails.

I do the following steps:

dotnet publish -c Release -o out
docker build -t myApp .

The Dockerfile looks like this:

FROM microsoft/dotnet:1.1.0-preview1-runtime
WORKDIR /service
COPY out ./service/
ENTRYPOINT ["dotnet", "myApp.dll"]

Essentially I'm following the steps from https://github.com/dotnet/dotnet-docker . I'm getting all the time the following error:

Did you mean to run dotnet SDK commands? Please install dotnet SDK from: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

I'm not sure what I am missing here...

like image 249
Carlos Torrecillas Avatar asked Nov 07 '16 22:11

Carlos Torrecillas


1 Answers

I changed my dockerfile to have the following COPY statement:

COPY out ./

That then made the entrypoint to work because it was then able to find out myApp.dll. I think the message could be improved here, but that's me assuming that's what happened

like image 152
Carlos Torrecillas Avatar answered Oct 05 '22 13:10

Carlos Torrecillas