I would like to have the possibility to overwrite the default alias of a service on network level to avoid duplicates in external networks.
This could look like:
services:
db:
networks:
some-network:
name: my-db-to-override-db-default-alias
aliases:
- db_123_213
if you would inspect the service it should no longer be aliased as db
(...)
"Networks": {
"my_network": {
"Aliases": [
"8c2da47d1e8e",
"db_123_213",
"my-db-to-override-db-default-alias"
],
}
}
One use case would be if I have an external proxy network and several docker compose projects which each have a service X (e.g. app or pgsql). sometimes it would be useful to change the default alias for the external network to avoid a conflict.