Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work with remote podman containers #3367

Open
jameslikeslinux opened this issue Dec 21, 2024 · 0 comments
Open

Work with remote podman containers #3367

jameslikeslinux opened this issue Dec 21, 2024 · 0 comments
Labels
Feature New features and improvements.

Comments

@jameslikeslinux
Copy link

Use Case

For working with containers from within a container, I bind-mount /run/podman/podman.sock from the host and use podman-remote. Bolt only calls the local podman command to interact with containers.

Describe the Solution You Would Like

Add a podman transport option that accepts any valid Podman URL from podman-remote(1), including examples like:

  • unix:///run/user/$UID/podman/podman.sock
  • ssh://notroot@localhost:22/run/user/$UID/podman/podman.sock
  • ssh://root@localhost:22/run/podman/podman.sock
  • tcp://localhost:34451
  • tcp://127.0.0.1:34451

When this new option is set, Bolt should call podman-remote --url=VALUE to interact with containers.

Describe Alternatives You've Considered

As a workaround, I prepare my management container with:

# Force podman remote operations (bolt hardcodes podman)
file { '/usr/bin/podman':
  ensure => link,
  target => '/usr/bin/podman-remote',
}

That will cause bolt to work with /run/podman/podman.sock for all containers. One could set the environment variable CONNECTION_HOST to some other value. This would also apply to all containers. A transport option would allow this to be specified on a per target basis and let Bolt orchestrate tasks among many container hosts.

@jameslikeslinux jameslikeslinux added the Feature New features and improvements. label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New features and improvements.
Projects
None yet
Development

No branches or pull requests

1 participant