elemental-toolkit icon indicating copy to clipboard operation
elemental-toolkit copied to clipboard

Prevent use of --force argument when initing from container

Open anmazzotti opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

When building a derivative image and invoking elemental init, I always have to use --force. I wonder if this could be separated to a dedicated flag, like --allow-init-from-container for this specific case, so that --force can be omitted and used to make the build fail or pass due to warnings.

Describe the solution you'd like

As an example of this use case, considering the file overwriting issue, I would like warnings to be a failure reason to elemental init, with the ability of suppressing them using --force when needed.

anmazzotti avatar May 03 '24 09:05 anmazzotti

How are you building the images? docker build should put the /.dockerenv file that we check for in elemental init, so if that file exists you don't actually need to pass the --force flag.

frelon avatar May 08 '24 12:05 frelon