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

Read PODMAN_USERNS from .env

Open hadmut opened this issue 2 years ago • 3 comments

Hi,

to use podman + podman-compose in rootless mode instead of docker+docker-compose, I need to pass

PODMAN_USERNS=keep-id

as an environment variable, e.g. as

PODMAN_USERNS=keep-id podman-compose up

That works, but is a bit annoying and error prone.

Unfortunately, it does not work to just write

PODMAN_USERNS=keep-id

into the .env file, but that would be realy nice. So my proposal is to make podman-compose accept this setting from the .env file.

regards

hadmut avatar Mar 27 '23 02:03 hadmut

we read all env named PODMAN_* in the .env see

https://github.com/containers/podman-compose/blob/devel/podman_compose.py#L1433

please make sure to use latest devel branch

muayyad-alsadi avatar Mar 27 '23 12:03 muayyad-alsadi

userns usage also discussed with @hadmut at #654

bugfest avatar Apr 07 '23 17:04 bugfest

I confirm this is working, podman-compose is reading PODMAN_USERNS=keep-id from .env file.

Morikko avatar May 28 '24 16:05 Morikko