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

Issue with Specifying Port in DNS IP Address in Docker Compose Configuration #2

Open
Sorrow81 opened this issue May 9, 2024 · 0 comments

Comments

@Sorrow81
Copy link

Sorrow81 commented May 9, 2024

Hello Team,

I'm encountering an issue when using Docker Compose where I'm unable to specify a port along with an IP address in the dns configuration of a service. Below is the error I receive when trying to execute the Docker Compose up command:

rroot@openmediavault:/opt/compose/wirepius# docker compose -f wirepius.yml up --build
[+] Running 4/4
 ✔ Container stubby     Created                                                                                    0.1s
 ✔ Container unbound    Created                                                                                    0.0s
 ✔ Container pihole     Created                                                                                    0.0s
 ✔ Container wireguard  Created                                                                                    0.0s
Attaching to pihole, stubby, unbound, wireguard
stubby     | [12:48:57.899621] STUBBY: Stubby version: Stubby 0.4.0
stubby     | [12:48:57.901131] STUBBY: Read config from file /opt/stubby/etc/stubby/stubby.yml
stubby     | [12:48:57.901439] STUBBY: DNSSEC Validation is ON
stubby     | [12:48:57.901443] STUBBY: Transport list is:
stubby     | [12:48:57.901445] STUBBY:   - TLS
stubby     | [12:48:57.901446] STUBBY: Privacy Usage Profile is Strict (Authentication required)
stubby     | [12:48:57.901448] STUBBY: (NOTE a Strict Profile only applies when TLS is the ONLY transport!!)
stubby     | [12:48:57.901449] STUBBY: Starting DAEMON....
Error response from daemon: bad nameserver address 10.2.0.201:8053: ParseAddr("10.2.0.201:8053"): unexpected character (at ":8053")

Details:

  • Docker Compose Version: Docker Compose version v2.27.0
  • OS: Debian GNU/Linux 11 (bullseye)
  • Docker Engine Version: Docker version 26.1.1, build 4cf5afa

Description:

I am trying to specify 10.2.0.201:8053 as a DNS server in the dns field of my Docker Compose configuration file. This IP and port combination points to a Stubby DNS resolver that is set to listen on port 8053 rather than the default DNS port of 53. Historically, I was able to set this configuration in previous versions of Docker, but now I'm facing this syntax error which prevents the container from starting.

The issue seems to stem from the inability of Docker Compose to parse IP addresses with ports in the DNS settings, as indicated by the error message. This functionality is crucial for my current project setup where DNS queries must be directed to a specific port.

Expected Behavior:

Docker Compose should be able to parse and accept IP addresses with specified ports in the dns configuration for services.

Actual Behavior:

Docker Compose fails to parse the IP address with a port, resulting in an error and preventing the service from starting.

Steps to Reproduce:

  1. Include a DNS configuration in the Docker Compose file with an IP address that includes a port.
  2. Run the Docker Compose up command.
  3. Observe the error.

I am seeking guidance or a workaround to specify a DNS server with a port in the Docker Compose file. Any help or updates on this issue would be greatly appreciated.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant