Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The /kaniko/executor --digest-file option should create parent directories #813

Closed
Ark-kun opened this issue Oct 12, 2019 · 6 comments · Fixed by #1612
Closed

The /kaniko/executor --digest-file option should create parent directories #813

Ark-kun opened this issue Oct 12, 2019 · 6 comments · Fixed by #1612
Assignees
Labels
area/cli bugs related to kaniko CLI good first issue Good for newcomers help wanted Looking for a volunteer!

Comments

@Ark-kun
Copy link

Ark-kun commented Oct 12, 2019

Actual behavior
I run Kaniko Docker container with the --digest-file option:

/kaniko/executor ... --digest-file /tmp/outputs/Image_name_with_digest/data

The execution fails due to the lack of parent directories:

�[33mWARN�[0m[0055] error uploading layer to cache: writing digest to file failed: open /tmp/outputs/Image_name_with_digest/data: no such file or directory 
error pushing image: writing digest to file failed: open /tmp/outputs/Image_name_with_digest/data: no such file or directory

I cannot add a script to pre-create the parent directories, because Kaniko image is distroless and lacks sh.

Expected behavior
I expect Kaniko to create the parent directories for any output file it writes.

Description Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
Please check if your dockerfile is a multistage dockerfile
@priyawadhwa priyawadhwa added help wanted Looking for a volunteer! good first issue Good for newcomers labels Oct 15, 2019
@priyawadhwa
Copy link
Collaborator

Hey @Ark-kun thanks for opening this issue. This should be a pretty easy fix -- we can create the directories with os.MkdirAll before writing the file here.

If you, or anyone else, is interested in opening a PR, please comment here and I can assign you to the issue. Also, please cc me on any PRs opened so I can review them.

@tejal29 tejal29 added the area/cli bugs related to kaniko CLI label Oct 16, 2019
@prary
Copy link
Contributor

prary commented Oct 19, 2019

@priyawadhwa you can assign this to me.

@priyawadhwa
Copy link
Collaborator

@prary sounds good!

@vivek-26
Copy link
Contributor

@priyawadhwa Can I work on this issue?

@priyawadhwa
Copy link
Collaborator

@vivek-26 sure, looks like #884 has been quiet for a few months.

@vivek-26
Copy link
Contributor

@priyawadhwa PR opened, please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli bugs related to kaniko CLI good first issue Good for newcomers help wanted Looking for a volunteer!
Projects
None yet
5 participants