我正在尝试将dotnet核心应用程序打包到linux容器中。
Docker构建步骤失败,找不到文件(即使相同的构建在带有Windows容器的Windows托管代理上工作)。我甚至尝试使用命令行步骤在docker构建步骤前面验证文件...文件在那里,但是docker构建步骤无法找到路径。我尝试过不同的工作目录和路径组合。
Docker步骤甚至无法将CD放入目录......
2018-04-26T16:49:43.8883276Z /opt/vsts/work/1/s/src/WebJobs/DuckBotApp:
OMITTED
2018-04-26T16:49:43.9014280Z -rw-r--r-- 1 root root 482 Apr 26 16:49 Dockerfile
2018-04-26T16:49:43.9037992Z -rw-r--r-- 1 root root 327 Apr 26 16:49 Dockerfile.console
2018-04-26T16:49:44.1007654Z ##[section]Finishing: Run ls
2018-04-26T16:49:44.1940055Z ##[section]Starting: Build an image
2018-04-26T16:49:44.2011240Z ==============================================================================
2018-04-26T16:49:44.2025778Z Task : Docker
2018-04-26T16:49:44.2039774Z Description : Build, tag, push, or run Docker images, or run a Docker command. Task can be used with Docker or Azure Container registry.
2018-04-26T16:49:44.2054257Z Version : 0.3.11
2018-04-26T16:49:44.2067825Z Author : Microsoft Corporation
2018-04-26T16:49:44.2081837Z Help : [More Information](https://go.microsoft.com/fwlink/?linkid=848006)
2018-04-26T16:49:44.2099961Z ==============================================================================
2018-04-26T16:49:44.7859039Z cd: no such file or directory: /opt/vsts/work/1/s/src/Webjobs/DuckBotApp/
2018-04-26T16:49:44.7869389Z
2018-04-26T16:49:44.8012786Z ##[error]Unhandled: Failed cd: cd: no such file or directory: /opt/vsts/work/1/s/src/Webjobs/DuckBotApp/
答案 0 :(得分:1)
将Webjobs
替换为WebJobs
(区分大小写)。