mirror of
https://github.com/containers/podman.git
synced 2025-05-17 15:18:43 +08:00
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:
@ -78,6 +78,11 @@ function compare_usage() {
|
||||
local cmd="$1"
|
||||
local from_man="$2"
|
||||
|
||||
# Special case: this is an external call to docker
|
||||
if [[ $cmd = "podman compose" ]] || [[ $cmd = "podmansh" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# Sometimes in CI we run before podman gets built.
|
||||
test -x ../../../bin/podman || return
|
||||
|
||||
|
@ -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') {
|
||||
|
Reference in New Issue
Block a user