mirror of
https://github.com/containers/podman.git
synced 2025-05-17 15:18:43 +08:00

The --env is used to add new environment variable to container or override the existing one. The --unsetenv is used to remove the environment variable. It is done by sharing "env" and "unsetenv" flags between both "update" and "create" commands and later handling these flags in the "update" command handler. The list of environment variables to add/remove is stored in newly added variables in the ContainerUpdateOptions. The Container.Update API call is refactored to take the ContainerUpdateOptions as an input to limit the number of its arguments. The Env and UnsetEnv lists are later handled using the envLib package and the Container is updated. The remote API is also extended to handle Env and EnvUnset. Fixes: #24875 Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
305 B
305 B
####> This option file is used in: ####> podman update ####> If file is edited, make sure the changes ####> are applicable to all of those.
--unsetenv=env
Unset environment variables from the container.
Note that the env updates only affect the main container process after the next start.