我执行以下步骤:
dotnet publish -c Release -o out docker build -t myApp。Dockerfile如下所示:
FROM microsoft / dotnet:1.1.0-preview1-runtime WORKDIR / service COPY out ./service/ ENTRYPOINT [dotnet,myApp .dll]本质上,我按照 github/dotnet/dotnet-docker 。我得到所有的时间以下错误:
你的意思是运行dotnet SDK命令?请从以下网址安装dotnet SDK : go.microsoft/。 com / fwlink /?LinkID = 798306& clcid = 0x409
我不知道我在这里丢失了什么。
解决方案我更改了我的docker文件以具有以下COPY语句:
COPY out ./然后将entrypoint工作,因为它然后能够找到myApp.dll。我认为这个消息可以在这里得到改善,但这就是我假设发生了什么事。
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 github/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: go.microsoft/fwlink/?LinkID=798306&clcid=0x409
I'm not sure what I am missing here...
解决方案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
更多推荐
使用docker运行dotnet 1.1
发布评论