简体   繁体   English

在Linux托管代理上找不到Dockerfile

[英]Dockerfile not found on Linux hosted agent

I'm trying to package dotnet core application into linux container. 我正在尝试将dotnet核心应用程序打包到linux容器中。

Docker build step fail with file not found (even though the same build works on the windows hosted agent with windows containers). Docker构建步骤失败,找不到文件(即使相同的构建在具有Windows容器的Windows托管代理上也可以运行)。 I've even tried verifying files are there with command line step right in front of the docker build step... files are there, but docker build step fails to find the path. 我什至尝试通过docker build步骤前面的命令行步骤来验证文件是否存在...文件在那里,但是docker build步骤无法找到路径。 I've tried different combination of working dir and paths. 我尝试了工作目录和路径的不同组合。

Docker step even fails to CD into the directory... 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/

建立过程

Webjobs替换为WebJobs (区分大小写)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM