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

podman does not support "network ls --filter dangling=true" #204

Closed
holgerschurig opened this issue Jun 15, 2022 · 4 comments
Closed

podman does not support "network ls --filter dangling=true" #204

holgerschurig opened this issue Jun 15, 2022 · 4 comments

Comments

@holgerschurig
Copy link

I have the newest and shiniest podman installed, fresh from git:

$ podman version 
Client:       Podman Engine
Version:      4.2.0-dev
API Version:  4.2.0-dev
Go Version:   go1.17.11
Git Commit:   9fac1b335f681400a029e9d8014f45fa5634ec40
Built:        Tue Jun 14 13:53:13 2022
OS/Arch:      linux/amd64

And when I run M-x docker --- after (setq docker-command "podman") of course --- I get this error messages:

error in process sentinel: docker-process-sentinel: Error running: "podman network ls --filter dangling=true --format="[{{ json .ID }},{{ json .ID }},{{ json .Name }},{{ json .Driver }}]"" (exited abnormally with code 125)
error in process sentinel: Error running: "podman network ls --filter dangling=true --format="[{{ json .ID }},{{ json .ID }},{{ json .Name }},{{ json .Driver }}]"" (exited abnormally with code 125)

And really, if I run this command in the shell, I get an error:

schurig@desktop:~$ podman network ls --filter dangling=true --format="[{{ json .ID }},{{ json .ID }},{{ json .Name }},{{ json .Driver }}]"
Error: invalid filter "dangling"

It works however without the filter:

schurig@desktop:~$ podman network ls --format="[{{ json .ID }},{{ json .ID }},{{ json .Name }},{{ json .Driver }}]"
["2f259bab93aa","2f259bab93aa","podman","bridge"]

Now I looked into docker.el source code, and found that this filter is hardcoded into several functions. Can we make this customizable?

This might actually also help docker users of stable distributions. For example, when I look at https://manpages.debian.org/testing/podman-docker/docker-network-ls.1.en.html I don't see a "dangling" filter documented.

@Silex
Copy link
Owner

Silex commented Jun 15, 2022

Well, podman is not supported (see #110).

If you think it's feasible to support it, please help provide a path toward that.

Supporting old dockers is also not a priority to me 😅

@Silex
Copy link
Owner

Silex commented Jun 15, 2022

That said, removing dangling=true can be disabled partially by using setting docker-show-status to nil, but then we need some new variable like docker-no-pretty-listings which would use docker-container-entries instead of docker-container-entries-propertized, etc.

@Silex Silex changed the title podman deosn't support "--filter dangling=true" podman does not support "--filter dangling=true" Jun 15, 2022
@holgerschurig
Copy link
Author

I learned that only "podman network ls" doesn't support this filter. Interestingly, "podman image ls" and "podman volume ls" support it:

schurig@desktop:~$ podman image ls
REPOSITORY                         TAG         IMAGE ID      CREATED       SIZE
localhost/dev                      latest      fb17046ed4bc  24 hours ago  1.45 GB
localhost/bullseye.bootstrap.i386  latest      f92965da12ed  42 hours ago  326 MB
schurig@desktop:~$ podman image ls --filter dangling=true
REPOSITORY  TAG         IMAGE ID    CREATED     SIZE
schurig@desktop:~$ podman volume ls
schurig@desktop:~$ podman volume ls --filter dangling=true
schurig@desktop:~$ podman network ls
NETWORK ID    NAME        DRIVER
2f259bab93aa  podman      bridge
schurig@desktop:~$ podman network ls --filter dangling=true
Error: invalid filter "dangling"
schurig@desktop:~$ 

I also opened a ticket at Podman, because the problem might actually be there: containers/podman#14595

If Podman fixes this, then only the part of "Stable Linux distributions with old versions of Docker doesn't have this filter" would be true.

@holgerschurig holgerschurig changed the title podman does not support "--filter dangling=true" podman does not support "network ls --filter dangling=true" Jun 15, 2022
@Silex
Copy link
Owner

Silex commented Oct 10, 2022

Looks like it was merged, so this should be resolved.

@Silex Silex closed this as completed Oct 10, 2022
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

2 participants