unikraft / kraftkit

Build and use highly customized and ultra-lightweight unikernel VMs.
https://unikraft.org/docs/cli
BSD 3-Clause "New" or "Revised" License
204 stars 61 forks source link

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

Closed nderjung closed 1 month ago

nderjung commented 1 month ago

Prerequisite checklist

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.