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

Improve Podman support: Removing containers does not use commandTemplates #556

Open
hauskens opened this issue Jun 26, 2024 · 0 comments
Open

Comments

@hauskens
Copy link
Contributor

I've tried to customize my environment to support Podman, and it partially works, but some commands seems to be hard coded and is not possible to customize.
When deleting a container with compose it tries to run the command {{ .DockerCompose }} rm --stop --force hello_world which will fail with the error podman-compose: error: argument command: invalid choice: 'rm'

podman-compose does not have the rm option, so i tried to change the commandTemplates.down and commandTemplates.downWithVolumes configuration option, but that does not seem to have any effect.

I managed to locate the code where it runs the command:

command: fmt.Sprintf("%s rm --stop --force %s", composeCommand, service.Name),

command: fmt.Sprintf("%s rm --stop --force -v %s", composeCommand, service.Name),

I have not checked if there are other places that also has this problem, but using commandTemplates would be a important improvement for supporting Podman.

Running lazydocker version 0.23.3 on NixOS.

hauskens added a commit to hauskens/home-manager that referenced this issue Jun 26, 2024
* Add lazydocker module
* maintainers: add hausken

Based on Lazygit module.
Note: Podman is not supported, you can set the DOCKER_HOST env var, but the experience is not good. Created a request in lazydocker repo jesseduffield/lazydocker#556
hauskens added a commit to hauskens/home-manager that referenced this issue Jun 27, 2024
* Add lazydocker module
* maintainers: add hausken

Based on Lazygit module.
Note: Podman is not supported, you can set the DOCKER_HOST env var, but the experience is not good. Created a request in lazydocker repo jesseduffield/lazydocker#556
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant