Skip to main content

require_project_install

Function require_project_install 

Source
pub fn require_project_install(
    project: &ProjectFiles,
    dockerfile: &str,
) -> Result<(), Error>
Expand description

Rejects a caller Dockerfile that never mentions the lockfile the request carries.

The project files enter the artifact unconditionally once the request holds them, so a custom Dockerfile that ignores them builds cleanly and produces an image with no environment layer — and the symptom appears at launch, as every dependency installing inside the guest, with nothing anywhere naming the COPY that was never written. That is the silent-degradation shape: the caller asked for the layer, paid the build, and got an image indistinguishable from one that never asked.

Weak-form on purpose, like require_daemon_cmd: a substring test for the lockfile’s name rather than parsing COPY syntax, because the check exists to catch a Dockerfile that plainly ignores the files, not to validate how it consumes them.