Add generate systemd -e/--env option

-e/--env option sets environment variables to the systemd unit files.

Fixes: #15523

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
This commit is contained in:
Toshiki Sonoda
2022-09-02 16:20:26 +09:00
parent 9ab6449e36
commit a9a411f8a8
11 changed files with 263 additions and 150 deletions

View File

@ -44,6 +44,12 @@ User-defined dependencies will be appended to the generated unit file, but any e
Set the systemd unit name prefix for containers. The default is *container*.
#### **--env**, **-e**=*env*
Set environment variables to the systemd unit files.
If an environment variable is specified without a value, Podman will check the host environment for a value and set the variable only if it is set on the host. As a special case, if an environment variable ending in __*__ is specified without a value, Podman will search the host environment for variables starting with the prefix and will add those variables to the systemd unit files.
#### **--files**, **-f**
Generate files instead of printing to stdout. The generated files are named {container,pod}-{ID,name}.service and will be placed in the current working directory.