containers / containers/podman-compose

DNS resolution fails for the container network.

Open
#1,151 6 comments 6 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
6.2k
Forks
622
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
DNS resolution fails for the container network.

Wordpress service from example [examples/wordpress/docker-compose.yaml ](https://github.com/containers/podman-compose/blob/main/examples/wordpress/docker-compose.yaml) does not connect to the database.

Additionally, I noticed that in the **bad commit**, the file **/run/user/1000/rootless-cni/run/user/1000/containers/cni/dnsname/dev_default/dnsmasq.conf** does not appear.

After using git bisect, a regression was found from commit 978a138.
With commit 4a232f5e, the issue is resolved.

**To Reproduce**
Steps to reproduce the behavior:
1. Download [docker-compose.yaml](https://github.com/containers/podman-compose/blob/main/examples/wordpress/docker-compose.yaml)
2. Navigate to the folder containing the docker-compose.yaml file.
3. Run podman-compose up.

**Expected behavior**
The Wordpress service should connect to Mysql.

**Actual behavior**
Containers do not resolve DNS. The Wordpress service cannot connect to mysql.

**Environment:**
- OS: Linux Ubuntu 22.04.5 LTS, kernel version 6.8.0-52-generic
- podman version 3.4.4
- containernetworking-plugins 1.1.1+ds1-3build1
- golang-github-containernetworking-plugin-dnsname 1.3.1+ds1-2ubuntu0.22.04.1

Contributor guide

Open the contributing guide

Research direction

Start with examples/wordpress/docker-compose.yaml and reproduce the failure using podman-compose up on the stated Ubuntu environment. Compare the behavior around commits 978a138 and 4a232f5e, and inspect whether the mentioned dnsmasq.conf path is created. Done means the containers resolve DNS and the Wordpress service connects to Mysql.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, linux, python
Domain
devops, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.