Skip to content
Advertisement

Dockerfile not found on Linux hosted agent

I’m trying to package dotnet core application into linux container.

Docker build step fail with file not found (even though the same build works on the windows hosted agent with windows containers). 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. I’ve tried different combination of working dir and paths.

Docker step even fails to CD into the directory…

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/

build process

Advertisement

Answer

Replace Webjobs to WebJobs (Case sensitive).

Advertisement