Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4d222e9

Browse files
Updated no dockerfile page
1 parent925e18b commit4d222e9

File tree

2 files changed

+72
-41
lines changed

2 files changed

+72
-41
lines changed

‎_docs/troubleshooting/common-issues/error-code-137.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The error usually happens when Docker does not have enough memory, but it can al
3232

3333
##The solution
3434

35-
You need to either simplify your application (e.g.slit itwith microservices) or run the pipeline on a larger machine. For example if the build fails on a`SMALL` machine you should run it on a`MEDIUM` one. You can upgrade your account to get access to more resource by visiting your[Billing Settings](https://g.codefresh.io/account-admin/billing/).
35+
You need to either simplify your application (e.g.split itto microservices) or run the pipeline on a larger machine. For example if the build fails on a`SMALL` machine you should run it on a`MEDIUM` one. You can upgrade your account to get access to more resource by visiting your[Billing Settings](https://g.codefresh.io/account-admin/billing/).
3636

3737

3838

Lines changed: 71 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,79 @@
11
---
22
title:"No Dockerfile found"
3-
description:""
3+
description:"Failed to fetch the Dockerfile from path"
44
group:troubleshooting
55
sub_group:common-issues
66
redirect_from:
77
-/docs/no-dockerfile-found/
88
toc:true
99
---
10-
***Problem:*** When I tried to build a repository, I received this error message: “Repository does not contain a Dockerfile. Please check the pipeline configuration”.
11-
12-
{% include
13-
image.html
14-
lightbox="true"
15-
file="/images/92c8d50-2016-09-29_12-29-10.png"
16-
url="/images/92c8d50-2016-09-29_12-29-10.png"
17-
alt="2016-09-29_12-29-10.png"
18-
max-width="40%"
19-
caption="This error indicates that the repository doesn’t have a Dockerfile in it or the path for the Dockerfile was incorrect."
20-
%}
21-
22-
***Solution:*** There are two ways to address this error:
23-
24-
{:start="1"}
25-
1. Add a Dockerfile to the repository or verify that you configured the correct path to the Dockerfile.
26-
27-
To configure the Dockerfile path in the pipeline configuration, navigate to**`Repositories`**→**`Your Repository`**→**`Pipelines`**.
28-
29-
{% include
30-
image.html
31-
lightbox="true"
32-
file="/images/3c8f08e-2016-09-29_12-57-55.png"
33-
url="/images/3c8f08e-2016-09-29_12-57-55.png"
34-
alt="2016-09-29_12-57-55.png"
35-
max-width="40%"
36-
%}
37-
38-
{:start="2"}
39-
2. Use a pre-configured Codefresh Dockerfile template from the template selector on the Pipeline view. Navigate to**`Repositories`**→**`Your Repository`**→**`Pipelines`**.
40-
41-
{% include
42-
image.html
43-
lightbox="true"
44-
file="/images/6b035ff-2016-09-29_13-03-58.png"
45-
url="/images/6b035ff-2016-09-29_13-03-58.png"
46-
alt="2016-09-29_13-03-58.png"
47-
max-width="40%"
48-
%}
10+
11+
You have a[build step]({{site.baseurl}}/docs/codefresh-yaml/steps/build/) in your pipeline that fails with the error message: "Repository does not contain a Dockerfile. Please check the pipeline configuration" or "Failed to fetch the Dockerfile from path"
12+
13+
##Problem description
14+
15+
This error happens 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.
16+
17+
`pipeline step`
18+
{% highlight yaml %}
19+
{% raw %}
20+
print_pwd_files:
21+
title: 'Listing files'
22+
image: alpine:latest
23+
commands:
24+
- 'ls -l'
25+
{% endraw %}
26+
{% endhighlight %}
27+
28+
##The solution
29+
30+
There are two ways to address this error:
31+
32+
First make sure that you have at least one[clone step]({{site.baseurl}}/docs/codefresh-yaml/steps/git-clone/) in your pipeline and that its name is`main_clone`. This way the current folder will automatically be setup in the project folder of the git repository.
33+
34+
`codefresh.yml`
35+
{% highlight yaml %}
36+
{% raw %}
37+
version: '1.0'
38+
steps:
39+
main_clone:
40+
title: 'Cloning main repository...'
41+
type: git-clone
42+
repo: kostis-codefresh/example_nodejs_postgres
43+
revision: master
44+
git: github
45+
myDockerImage:
46+
title: 'Building My Docker Image'
47+
type: build
48+
dockerfile: Dockerfile
49+
image_name: my-app-image
50+
tag: from-master-branch
51+
{% endraw %}
52+
{% endhighlight %}
53+
54+
Secondly, if you checkout multiple git repositories or use another name in your git clone step, make sure that the build step looks at the correct directory:
55+
56+
`codefresh.yml`
57+
{% highlight yaml %}
58+
{% raw %}
59+
version: '1.0'
60+
steps:
61+
checkoutApp:
62+
title: 'Cloning a repository...'
63+
type: git-clone
64+
repo: kostis-codefresh/trivial-go-web
65+
revision: master
66+
git: github
67+
myDockerImage:
68+
title: 'Building Docker Image'
69+
type: build
70+
dockerfile: Dockerfile
71+
working_directory: './trivial-go-web'
72+
image_name: my-app-image
73+
tag: from-master-branch
74+
{% endraw %}
75+
{% endhighlight %}
76+
77+
Notice the`working_directory` property of the build step that searches for the Dockefile in the folder named`trivial-go-web` instead of the root folder of the pipeline workspace.
78+
79+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp