Skip to content

Containers across namespaces boundary show up in /etc/hosts #3365

@apostasie

Description

@apostasie

Description

nerdctl run -d --namespace one --name deb1 debian sleep Inf
nerdctl run -d --namespace two --name deb2 debian sleep Inf
nerdctl exec --namespace two deb2 cat /etc/hosts

This can lead to situations where entries in /etc/hosts are duplicated (when containers in different namspaces have the same name).

Of course this also breaks the promise of some isolation between ns.

Steps to reproduce the issue

na

Describe the results you received and expected

na

What version of nerdctl are you using?

main

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

None

Host information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions