add a podman-compose command

**podman compose** is a thin wrapper around an external compose provider
such as docker-compose or podman-compose.  This means that `podman
compose` is executing another tool that implements the compose
functionality but sets up the environment in a way to let the compose
provider communicate transparently with the local Podman socket.  The
specified options as well the command and argument are passed directly
to the compose provider.

The default compose providers are `docker-compose` and `podman-compose`.
If installed, `docker-compose` takes precedence since it is the original
implementation of the Compose specification and is widely used on the
supported platforms (i.e., Linux, Mac OS, Windows).

If you want to change the default behavior or have a custom installation
path for your provider of choice, please change the `compose_provider`
field in `containers.conf(5)`.  You may also set the
`PODMAN_COMPOSE_PROVIDER` environment variable.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2023-07-17 13:43:24 +02:00
parent b9383f41ac
commit e596b17fbe
26 changed files with 521 additions and 23 deletions

View File

@ -95,6 +95,13 @@ my %Format_Option_Is_Special = map { $_ => 1 } (
'inspect', # ambiguous (container/image)
);
# Do not cross-reference these.
my %Skip_Subcommand = map { $_ => 1 } (
"help", # has no man page
"completion", # internal (hidden) subcommand
"compose", # external tool, outside of our control
);
# END user-customizable section
###############################################################################
@ -279,8 +286,8 @@ sub xref_by_man {
next if "@subcommand" eq 'system' && $k eq 'service';
# Special case: podman completion is a hidden command
next if $k eq 'completion';
# Special case for hidden or external commands
next if $Skip_Subcommand{$k};
warn "$ME: 'podman @subcommand': $k in $man, but not --help\n";
++$Errs;
@ -346,7 +353,7 @@ sub podman_help {
}
$help{$subcommand} = podman_help(@_, $subcommand)
unless $subcommand eq 'help'; # 'help' not in man
unless $Skip_Subcommand{$subcommand};
}
}
elsif ($section eq 'options') {