Re: [PATCH RESEND v3 1/3] scripts: add TOML config to container tool
From: Nicolas Schier
Date: Fri Sep 04 2026 - 15:20:37 EST
On Wed, Sep 02, 2026 at 11:33:00AM +0200, Guillaume Tucker wrote:
> Add support for a TOML configuration file to the scripts/container
> tool. This improves user experience by not having to keep passing the
> same command line options all the time or overly relying on built-in
> default values. Include the concept of 'profiles' with different
> named sections in the file to cover various use cases.
>
> Command line options take precedence over the config file, and values
> defined in profile sections take precedence over the default one.
>
> Add a -c option to override the location of the .container.toml config
> file which should otherwise be located in the current working
> directory. If not found, the file is silently ignored as it is not
> strictly required unless the -c option is used.
>
> Add a -p option to choose a particular profile section in the config
> file rather than the default.
>
> Signed-off-by: Guillaume Tucker <gtucker@xxxxxxxxxx>
> ---
>
> Notes:
> Changes in v2:
> - fix uid / gid handling when set to 0 (root)
>
> Changes in v3:
> - fix logic when loading config profiles using None
> - fix typo with missing whitespace in help message
> - clarify how UID gets used as default value for GID
>
> scripts/container | 89 ++++++++++++++++++++++++++++++++++++++++-------
> 1 file changed, 77 insertions(+), 12 deletions(-)
>
Acked-by: Nicolas Schier <n.schier@xxxxxxxxx>
--
Nicolas