我正在尝试创建我的第一个泊坞窗图像和容器
我按照我在网上找到的文件/视频。
在我的Microsoft Windows 10 Pro - 10.0.16299 Build 16299
上,我可以在运行命令docker build -t web .
后成功构建ASP.NET Core应用程序
但是当我尝试运行图像docker run -ti web
时,我收到错误:
要执行的应用程序不存在:'C:\ app \ Web.dll'
是否有列出文件的命令?我想检查路径和存在的位置(如果)。我无法在网上找到这样的命令
此外,任何寻找问题的提示都会很棒。另外(如果它有帮助)docker ps
没有列出任何内容。
泊坞:
Client:
Version: 18.02.0-ce
API version: 1.36
Go version: go1.9.3
Git commit: fc4de44
Built: Wed Feb 7 21:12:53 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.02.0-ce
API version: 1.36 (minimum version 1.24)
Go version: go1.9.3
Git commit: fc4de44
Built: Wed Feb 7 21:26:24 2018
OS/Arch: windows/amd64
Experimental: true
Dockerfile:
# Stage 1
FROM microsoft/aspnetcore-build AS builder
WORKDIR /source
# caches restore result by copying csproj file separately
COPY Web.sln ./src/aspdocker/Web.sln
COPY Web.Library/Web.Library.csproj ./src/aspdocker/Web.Library/
COPY Web.Core/Web.Core.csproj ./src/aspdocker/Web.Core/
COPY Web.Hosting/Web.Hosting.csproj ./src/aspdocker/Web.Hosting/
COPY Web.Library.Tests/Web.Library.Tests.csproj ./src/aspdocker/Web.Library.Tests/
COPY Web.Core.Tests/Web.Core.Tests.csproj ./src/aspdocker/Web.Core.Tests/
# caches restore result by copying csproj file separately
RUN dotnet restore ./src/aspdocker/Web.sln
# copies the rest of your code
COPY . .
RUN dotnet publish --output /app/
# Stage 2
#FROM microsoft/aspnetcore:1.1.2
FROM microsoft/aspnetcore
WORKDIR /app
COPY --from=builder /app .
#EXPOSE 5000/tcp
ENTRYPOINT ["dotnet", "Web.dll"]