Description
Describe the bug
I want to use the remote capability of docker to deploy containers on a remote host.
podman-compose
knows nothing about this feature, but the doc says:
...
--podman-args args custom global arguments to be passed to `podman`
...
I'm understanding that one can pass argument to podman
thanks to --podman-args
.
The hope here is to let podman-compose
talk locally to podman
, using --podman-args="--remote"
the later will be driving a remote host, and that it will be smooth.
There are also several --podman-{CMD}-args
flags to pass arguments to dedicated command, which is not what I'm looking for. (at least, not at the moment)
To Reproduce
Steps to reproduce the behavior:
0. setup a remote host with podman installed and ready to serve remotely
- Fedora Server 38 in a small VM in VirtualBox
- setup remote access with key pairs (ssh-copy-id …)
- enable podman.socket on the host
- make a container running
- add a podman connection to the host
$ podman system connection add --default remote ssh://user@remote
- check the remote access with podman
$ podman --remote container ls
- ✅ it returns the list of running container on the remote host and not on the localhost
- check the remote access with podman-compose
$ podman-compose --project-name my-project --podman-args="--remote" ps
- ❎ the following error occurs
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.5.0
podman ps --remote -a --filter label=io.podman.compose.project=my-project
Error: unknown flag: --remote
See 'podman ps --help'
exit code: 125
The --remote
flag is set after ps
and not after podman
- podman is doing well when asking with the right command line:
- ✅
$ podman --remote ps -a --filter label=io.podman.compose.project=my-project
list all the container running remotely
Expected behavior
Running podman-compose --help
says
...
--podman-args args custom global arguments to be passed to `podman`
...
I'm expecting the args
to be passed to podman and not the the sub-command:
Expecting:
✅ podman --remote ps -a --filter label=io.podman.compose.project=my-project
Got:
❎ podman ps --remote -a --filter label=io.podman.compose.project=my-project
Actual behavior
Actually, arguments sent to podman-compose
via --podman-args
are given to the sub-command and not to podman globally as mentioned in the doc.
Output
$ podman-compose version
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.5.0
podman-compose version 1.0.6
podman --version
podman version 4.5.0
exit code: 0
Environment:
- OS: Linux (local: Fedora Workstation 37 / remote: Fedora Server 38)
- podman version: local: 4.5.0 / remote: 4.5.1
- podman compose version: 1.0.6
Additional context
As a workaround, it's always possibe to send podman-compose commands via SSH,
but want to avoid sending the compose file via SCP, and keeping things on the driver computer.
I hope it's clear, if not I'll be happy to clarify 🙂
Regards,