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

nerdctl network inspect does not list containers using the network #2998

Open
apostasie opened this issue May 13, 2024 · 4 comments · May be fixed by #4052
Open

nerdctl network inspect does not list containers using the network #2998

apostasie opened this issue May 13, 2024 · 4 comments · May be fixed by #4052
Labels
area/network enhancement New feature or request

Comments

@apostasie
Copy link
Contributor

Description

Title says all.

Steps to reproduce the issue

docker network inspect bridge
nerdctl network inspect bridge

Describe the results you received and expected

Docker list the containers that are attached to the network.

Nerdctl does not.

What version of nerdctl are you using?

1.7.6

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

@apostasie apostasie added the kind/unconfirmed-bug-claim Unconfirmed bug claim label May 13, 2024
@AkihiroSuda AkihiroSuda added enhancement New feature or request area/network and removed kind/unconfirmed-bug-claim Unconfirmed bug claim labels May 14, 2024
@tushar5526
Copy link

Hey! Can I take this one? Looks like a good first issue.

@apostasie
Copy link
Contributor Author

Hey! Can I take this one? Looks like a good first issue.

Sure, go for it!

@tushar5526
Copy link

tushar5526 commented Mar 27, 2025

Thanks, I have a few doubts.

In docker, Containers key is set to a JSON object as follows:

        "Containers": {
            "9e08488505d6a20f0075da060b7ca81bfd12cf3475530b1696678313c155953b": {
                "Name": "hardcore_morse",
                "EndpointID": "742d754f3271d9f561e2067a5f9eb2d93713ea55c6c69b015299ec42db361fb1",
                "MacAddress": "42:05:47:7b:b2:e5",
                "IPv4Address": "172.17.0.2/16",
                "IPv6Address": ""
            }
        }

What should be the output in case of --mode native?

In terms of implementation, it seems I can export the existing filterContainers function and use it the --network filter to figure out the appropriate containers for the network.

@apostasie
Copy link
Contributor Author

Thanks @tushar5526
Let's move discussion in your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/network enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants