No Dockerfile found
Failed to fetch the Dockerfile from path
Issue
Build step in your pipeline fails with the error message:
Repository does not contain a Dockerfile. Please check the pipeline configuration
OR
Failed to fetch the Dockerfile from path
Possible cause
This issue occurs when you are trying to build a Docker image and the pipeline step cannot find a Dockerfile. It might be helpful to include a dummy step in your pipeline that prints all files in the workspace. This way you can verify what files are available to the pipeline.
pipeline step
Solution
There are two ways to address this error:
Include clone step with name main_clone
First, make sure that you have at least one clone step in your pipeline, main_clone
as the name. This way the current folder is automatically set up in the project folder of the Git repository.
codefresh.yml
Verify target directory of build step
Secondly, if you check out multiple Git repositories or use a different name in your Git clone step, make sure that the build step looks at the correct directory:
codefresh.yml
Notice that the working_directory
property of the build step, searches for the Dockefile in the folder named trivial-go-web
instead of the root folder of the pipeline workspace.