containers / containers/podman-compose
DNS resolution to the container name or service name when a compose is run with root user is not working
- Dominant language
- Python
- Stars
- 6.2k
- Forks
- 622
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
DNS resolution to the container name or service name when a compose is run with root user is not working.
**To Reproduce**
This is the compose file:
```yaml
version: "2"
services:
box1:
image: docker.io/busybox:1.37.0
command: '/bin/sh -c "trap : TERM INT; sleep 9999999999d & wait"'
box2:
image: docker.io/busybox:1.37.0
command: '/bin/sh -c "trap : TERM INT; sleep 9999999999d & wait"'
```
**Expected behavior**
`box1`, `containers_box1_1`, `box2`, `containers_box2_1` are resolvable to the correct IP in each container. It is working like this if I run the same compose with the non-root user.
**Actual behavior**
Only `containers_box1_1` in box1 and `containers_box2_1` in box2 are resolvable.
**Output**
There is `bad address 'containers_box2_1'` for the unsupported DNS references.
**Environment:**
- OS: Linux
- podman version: 4.9.3
- podman compose version: 1.4.0
Contributor guide
Assessment
This issue has not been assessed yet.