使用docker运行dotnet 1.1 [英] Run dotnet 1.1 using docker
问题描述
我执行以下步骤:
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]
本质上,我按照 https://github.com/dotnet/dotnet-docker 。我得到所有的时间以下错误:
你的意思是运行dotnet SDK命令?请从以下网址安装dotnet SDK
: http://go.microsoft.com/。 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 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...
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!