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

fix(build): Handle presence of non-existent Dockerfile #1664

Conversation

nderjung
Copy link
Member

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

Detect whether the supplied Dockerfile exists before passing it to the packaging step. If a non-empty value for the Rootfs attribute is supplied to the packaging step, it will trickle through the rootfs build system and may cause failure due to misconfiguration. This is because the value of service.Build.Dockerfile is by default set to "Dockerfile" which may in fact not exist. The packaging step relies on the present of a Kraftfile which supersedes the Dockerfile.

Detect whether the supplied Dockerfile exists before passing it
to the packaging step.  If a non-empty value for the Rootfs
attribute is supplied to the packaging step, it will trickle
through the rootfs build system and may cause failure due to
misconfiguration.  This is because the value of
`service.Build.Dockerfile` is by default set to "Dockerfile"
which may in fact not exist.  The packaging step relies on the
present of a Kraftfile which supersedes the Dockerfile.

Signed-off-by: Alexander Jung <alex@unikraft.io>
@nderjung nderjung force-pushed the nderjung/fix/internal/cli/kraft/cloud/compose/build/fix-kraftfile-supercedes-dockerfile branch from 881f016 to e94c528 Compare May 16, 2024 08:41
@craciunoiuc craciunoiuc changed the title fix(build): Handle presence of non-existend Dockerfile fix(build): Handle presence of non-existent Dockerfile May 17, 2024
@craciunoiuc craciunoiuc merged commit 4744899 into unikraft:staging May 17, 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.

None yet

2 participants