Repository navigation
feat(network): let a service opt out of its name as a network alias - #14342
Merged
Merged
Conversation
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🔴 CRITICAL
One confirmed security/integrity finding: a directive in that redirects the core dependency to a personal fork. The PR author explicitly notes this must be removed before merging, but no automated gate prevents accidental merge.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
glours
force-pushed
the
service-name-alias-opt-out
branch
from
October 15, 2026 07:15
98789a1 to
19cf004
Compare
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
The service name is always registered as a DNS alias on every network a service is attached to, so two projects sharing a network and running a service with the same name resolve it to either container. Honor the use_service_name_alias attribute of a service's network entry: when false, the service name is not registered as an alias on that network only. The container name alias, the user's aliases and the service's other networks are untouched, and --use-aliases still decides whether any alias is set. Unset keeps the current behavior. The attribute comes from compose-go, through its ServiceNameAliasEnabled helper. go.mod temporarily replaces compose-go with its main branch, which has it: drop the replace once a version containing it is tagged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
glours
force-pushed
the
service-name-alias-opt-out
branch
from
October 16, 2026 08:26
19cf004 to
ec5ca35
Compare
ndeloof
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Honor the
use_service_name_aliasattribute of a service'snetworksentry (compose-spec/compose-spec#663): whenfalse, the service name is not registered as a DNS alias on that network. The container name alias, the user'saliasesand the service's other networks are untouched, and unset keeps the current behavior.--use-aliasesonrunstill decides whether any alias is set.This lets two projects sharing a network run a service with the same name without resolving it to either container.
Blocked on compose-spec/compose-go#943, which adds the field.
go.modtemporarily replaces compose-go with that branch; thereplacemust be dropped before merging.Related issue
Closes #8223
(not mandatory) A picture of a cute animal, if possible in relation to what you did
