Docker Community Forums

Share and learn in the Docker community.

Java containerized app cannot solve other containers domain name

Hi! I noticed that my containerized Java app is not able to solve the domain names of other containers, while other processes spawned in the same container can. I am running a fairly basic compose file with few services in Swarm mode. Also I noticed that the /etc/hosts file has no container entries, which leads me to believe that the domain names resolution is handled by the overlay DNS (I am new to docker and containerization ^^"). I looked around on Google and I noticed few had the same problem but never offered a solution that works in Swarm mode. Any ideas?

EDIT: I’ve rebooted my Raspberry Pi cluster, rmed and deployed again and now seems to work :crazy_face:. This seems odd…

Docker info:


Client: Docker Engine - Community
 Version:           19.03.11
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        42e35e6
 Built:             Mon Jun  1 09:13:07 2020
 OS/Arch:           linux/arm64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.11
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       42e35e6
  Built:            Mon Jun  1 09:11:40 2020
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683