containerd / containerd/nerdctl
Unable to attach to container network created with none.
- Dominant language
- Go
- Stars
- 10.4k
- Forks
- 826
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 44
Description
### Description
There is a use case with pause containers, where other containers attaches to the pause container network. The pause container is launched with network none. This requires the pause container have a copy of hosts, hostname and resolv conf.
It also seems to share a net namespace, the containers must also share a user namespace.
The solution is to have a copy of the hosts/hostname and resolv.conf. In case of container network, add userns and netns both.
Want to confirm is this an acceptable solution and i can send out an PR for it.
### Steps to reproduce the issue
1. Create a pause container with network none.
2. Create another container with --net container:
### Describe the results you received and expected
It would display errors with resolv.conf not found and once those configs are added would see an error with sys fs.
Expected result is to be able to connect to the network of pause container.
### What version of nerdctl are you using?
1.7.5
### Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
### Host information
lima vm (fedora image), but can be reproduced in any architecture.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.