Skip to content

fix(initrd): Correctly propagate workdir to dockerfile #1696

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

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

LucaSeri
Copy link
Contributor

@LucaSeri LucaSeri commented Jun 2, 2024

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran make fmt on your commit series before opening this PR;
  • Updated relevant documentation.

Description of changes

Commit 5cb57ad reworked the way the workdir is passed to different initrd implementation. This ended up
in having a duplicate workdir entry in the dockerfile initrd type. Changes take into account that with the new implementation, the path of the dockerfile is relative to the workdir.

This change ultimately solves an issue related to kraftkit not being able to find the dockerfile when building outside the cwd:

$ kraft build ../scss/redis/
<!> building rootfs                                                                                                                                                                                                                                               x86_64 [2.8s]
 i  creating ephemeral buildkit container
 i  #1 [internal] load build definition from Dockerfile
 i  #1 transferring dockerfile: 2B done
 i  #1 DONE 0.0s
 E  could not wait for err group: could not solve: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory

Commit 5cb57ad
reworked the way the workdir is passed
to different initrd implementation. This ended up
in having a duplicate workdir entry in the dockerfile
initrd type. Changes take into account that with the
new implementation, the path of the dockerfile is relative
to the workdir.

Signed-off-by: Luca Seritan <luca.seritan@gmail.com>
@LucaSeri LucaSeri requested a review from nderjung June 3, 2024 08:32
Copy link
Member

@craciunoiuc craciunoiuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good here. Thanks!

Reviewed-by: Cezar Craciunoiu cezar.craciunoiu@unikraft.io

Copy link
Member

@nderjung nderjung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nderjung nderjung merged commit b8468cd into unikraft:staging Jun 7, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants