[x] Tested your changes against relevant architectures and platforms;
[x] 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.
Prerequisite checklist
make fmt
on your commit series before opening this PR;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.