Issue with Short Name Resolution within Docker Container

Hello everyone,

I am facing an issue with short name resolution inside my Docker container where Metabase is running.

Due to internet constraints within my company, it's not feasible to use direct IP addresses. To be region-agnostic, we instead use short names, such as "data", as the host. This convention works well across most of our environments and applications.

However, I've noticed that when I run Metabase using Docker Compose, it cannot resolve these short names. I tried to curl https://data/healthcheck inside the container, but the short name "data" doesn't resolve.

Has anyone encountered a similar issue or have any insight into why this might be happening? Is there any known limitation or any Docker or Metabase configuration that could be influencing this?

Any help or guidance would be greatly appreciated.

Thank you in advance.

I think this is more a limitation of the os rather than Metabase. So you can’t use domain names?

The difficulty lies in utilizing the short name of my domain. Interestingly, this issue only arises within the Metabase's Docker container, while everything functions fine on the host itself.

For added context, my current task is to establish a connection to my database utilizing the short name of my domain, as demonstrated in the attached screenshot. It's also worth noting that I'm utilizing Docker Compose. The peculiar thing is, when I initiate the Metabase's container using docker run command, the connection proceeds without any issues.

image

This has led me to believe that the problem could potentially be a bug within Docker Compose. However, I'm not entirely sure if I'm overlooking something that's causing this issue.

Any help or suggestions are greatly appreciated! Thanks in advance.