podman-compose icon indicating copy to clipboard operation
podman-compose copied to clipboard

Allow providing default value for `--in-pod=` using environment variable

Open uosis opened this issue 9 months ago • 2 comments

With the new default of true, it is quite unergonomic and error prone to have to pass --in-pod= everywhere. This simple change allows providing default value using environment variable.

This should help mitigate https://github.com/containers/podman-compose/issues/795.

uosis avatar May 07 '24 15:05 uosis

Instead of using an environment variable, how about adding a custom section in the compose file ? like:

services:
  my_app:
    userns_mode: keep-id
    [...]
x-podman:
  in-pod: false

ggrandou avatar May 09 '24 13:05 ggrandou

Instead of using an environment variable, how about adding a custom section in the compose file ? like:

Yes, I though the same. We should reduce the amount of implicit state.

p12tic avatar May 13 '24 12:05 p12tic

@uosis thanks for opening an issue. The issue was fixed in https://github.com/containers/podman-compose/pull/964 by adding a custom section in the compose file as @ggrandou suggested. @p12tic the problem can be closed.

mokibit avatar Jun 19 '24 17:06 mokibit

Sounds good, thanks for a proper fix!

uosis avatar Jun 20 '24 03:06 uosis