containers / bootc

Boot and upgrade via container images
https://containers.github.io/bootc/
Apache License 2.0
769 stars 83 forks source link

install: Check if running in container earlier #881

Closed ckyrouac closed 2 weeks ago

ckyrouac commented 2 weeks ago

Previously, the check to verify install to-filesystem is being run within a container happened fairly late in prepare_install. This moves the check up before some of the other container specific checks. Now, the error should occur when trying a basic install to-filesystem invocation, e.g. bootc install to-filesystem /var/mnt.

This also adds a test to verify the error occurs with minimal arguments and adds host_is_container to the global state.

cgwalters commented 2 weeks ago

What we also should do here I think is add a test case...mmm in the nushell bits should be easy that verifies we do currently get an error.

ckyrouac commented 2 weeks ago

reworked this to focus on more clearly validating if install to-filesystem is running in a container.