Docker Community Forums

Share and learn in the Docker community.

Service discovery by hostname in alpine image

(Viveksaini07) #1

When I use alpine:3.3 base image containers can’t resole each others hostname, even when I link them. When I use ubuntu:trusty base image hostname gets resolved as expected.

Is there any issue with alpine image? My all images are based on alpine :cry:

(Iteamnetworkdc) #2

Yes, it is a known issue with Alpine 3.3. You have to use the edge tag if you want the issue resolved. 3.4 has the fixes, but not sure when that will be out.

(Viveksaini07) #3

Thanks. alipine:edge resolves the issue.

(Iteamnetworkdc) #4

Alpine 3.4 is out now. You should look into that. Much better solution. Released ~11 hours ago.

(Romd01) #5

I have a similiar problem.
I use 2 containers and custom network :

  • api
  • postgres
    Containers are inside the custom network.
    When I ping postgres with his name ( container name) in Api, I have a response but only after 5second…
    If I try with IP adress, response is immediatly.
    No problem with other base image. ( debian, ubuntu…)
    Tested with alpine 3.4 and edge…
    It’s a problem about alpine or container configuration ?

Can you help me ? Thanks