[GH-ISSUE #627] Bug: DPS is not working for Alpine containers #207

Closed
opened 2026-02-26 04:34:23 +03:00 by kerem · 3 comments
Owner

Originally created by @cmiguelcabral on GitHub (Aug 13, 2025).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/627

What is Happening

DPS is not working for Alpine containers.
The comment # dps-entry creates the problem.
nslookup: bad address '172.18.0.4 # dps-entry

Changing the resolv.conf manually to:

# dps-entry
nameserver 172.18.0.4

Solves the problem. But it gets changed again automatically to nameserver 172.18.0.4 # dps-entry
The problem is having the comment on the same line as the IP.

Please describe how to reproduce the issue with a MRE - Minimal Reproducible Example.

  • Start some container that uses alpine as base image with the resolv.conf mounted
  • docker exec to that container
  • Try nslookup to resolve some other container

What is Expected

It should return the IP address of the container, but instead I receive this:
nslookup: bad address '172.18.0.4 # dps-entry

Specs

  • Docker Version: 28.3.3
  • DPS Version: 3.32.5-snapshot-aarch64
  • Attach DPS Log file: N/A
  • OS: Fedora 42 and Debian Bullseye (On host)
Originally created by @cmiguelcabral on GitHub (Aug 13, 2025). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/627 ## What is Happening DPS is not working for Alpine containers. The comment `# dps-entry` creates the problem. `nslookup: bad address '172.18.0.4 # dps-entry` Changing the `resolv.conf` manually to: ```` # dps-entry nameserver 172.18.0.4 ```` Solves the problem. But it gets changed again automatically to `nameserver 172.18.0.4 # dps-entry` The problem is having the comment on the same line as the IP. Please describe how to reproduce the issue with a [MRE - Minimal Reproducible Example][1]. - Start some container that uses `alpine` as base image with the `resolv.conf` mounted - `docker exec` to that container - Try `nslookup` to resolve some other container ## What is Expected It should return the IP address of the container, but instead I receive this: `nslookup: bad address '172.18.0.4 # dps-entry` ## Specs * Docker Version: `28.3.3` * DPS Version: `3.32.5-snapshot-aarch64` * Attach DPS Log file: N/A * OS: Fedora 42 and Debian Bullseye (On host) [1]: https://en.wikipedia.org/wiki/Minimal_reproducible_example
kerem closed this issue 2026-02-26 04:34:23 +03:00
Author
Owner

@cmiguelcabral commented on GitHub (Aug 14, 2025):

I suggest doing it like Ansible does. Adding a BEGIN in the line before and an END in the line after the nameserver.

# BEGIN dps-entries
nameserver 172.18.0.4
# END dps-entries

This can also open the door to having multiple instances running.

<!-- gh-comment-id:3186245660 --> @cmiguelcabral commented on GitHub (Aug 14, 2025): I suggest doing it like Ansible does. Adding a `BEGIN` in the line before and an `END` in the line after the `nameserver`. ```` # BEGIN dps-entries nameserver 172.18.0.4 # END dps-entries ```` This can also open the door to having multiple instances running.
Author
Owner

@mageddo commented on GitHub (Dec 17, 2025):

Hey, better late than never. Really nice suggestion, I adopted that, released version 5.1.x, hope it will conciliate and adjust old changed files. I would appreciate feedback. Thanks in advance.

Example:

cat /etc/resolv.conf

# BEGIN dps-entries
nameserver 192.168.0.227
# END dps-entries

# BEGIN dps-comments
# nameserver 127.0.0.53
# END dps-comments
<!-- gh-comment-id:3666325719 --> @mageddo commented on GitHub (Dec 17, 2025): Hey, better late than never. Really nice suggestion, I adopted that, released version [5.1.x][1], hope it will conciliate and adjust old changed files. I would appreciate feedback. Thanks in advance. Example: cat /etc/resolv.conf ``` # BEGIN dps-entries nameserver 192.168.0.227 # END dps-entries # BEGIN dps-comments # nameserver 127.0.0.53 # END dps-comments ``` [1]: https://github.com/mageddo/dns-proxy-server/releases/tag/5.1.2-snapshot
Author
Owner

@cmiguelcabral commented on GitHub (Dec 18, 2025):

Awesome!
Thank you

<!-- gh-comment-id:3672475363 --> @cmiguelcabral commented on GitHub (Dec 18, 2025): Awesome! Thank you
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#207
No description provided.