If you, for example have a container service in docker-compose named elasticsearch, it is not resolvable through local DNS on some distributions of Linux.
More specifically, Ubuntu is impacted by this issue where Arch Linux is now, though independent testing should be carried out on MacOS to achieve parity.
The root cause of problem is because of the default Resolver configuration being provided on Ubuntu is different than Arch.
To do's
I have been wanting to fix this for a while, so now is as good of a time as any.
- Provide examples of the Resolver configuration file causing issues, and not causing issues.
- Provide a
docker-compose.yml file that is testable.
- Determine the impact for currently supported MacOS versions.
- PR for a fix for this change on Linux and if appropriate MacOS
- CI tests for this change ensuring nothing is impacted by the PR (not strictly needed), and to show that container DNS does resolve.
Evidence of a working system
cli-drupal:/app$ curl opensearch:9200
{
"name" : "4a0a84aab61c",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "KHuKDDCIT3OVV-Y-ZFQ8Ng",
"version" : {
"distribution" : "opensearch",
"number" : "2.17.0",
"build_type" : "tar",
"build_hash" : "8586481dc99b1740ca3c7c966aee15ad0fc7b412",
"build_date" : "2024-09-13T01:04:14.707418737Z",
"build_snapshot" : false,
"lucene_version" : "9.11.1",
"minimum_wire_compatibility_version" : "7.10.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "The OpenSearch Project: https://opensearch.org/"
}
Source: https://github.com/lagoon-examples/drupal-opensearch
If you, for example have a container service in docker-compose named
elasticsearch, it is not resolvable through local DNS on some distributions of Linux.More specifically, Ubuntu is impacted by this issue where Arch Linux is now, though independent testing should be carried out on MacOS to achieve parity.
The root cause of problem is because of the default Resolver configuration being provided on Ubuntu is different than Arch.
To do's
I have been wanting to fix this for a while, so now is as good of a time as any.
docker-compose.ymlfile that is testable.Evidence of a working system
Source: https://github.com/lagoon-examples/drupal-opensearch