define compose container names with a valid hostname#8655
Merged
Conversation
62ded22 to
aca0d49
Compare
Member
|
wondering; would it help with the transition if we would set the "old" name as an (network) alias? Also possibly related if we'll be changing conventions; moby/swarmkit#1242 |
aca0d49 to
d1923f0
Compare
Contributor
ulyssessouza
left a comment
There was a problem hiding this comment.
Maybe just add a test with the --compatibility
870bae3 to
031b74e
Compare
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
031b74e to
497b25f
Compare
Contributor
Author
I don't think this would be very useful, as recommended way to access sibling container is to use service name, not plain container name anyway. |
antoineco
added a commit
to deviantony/docker-elk
that referenced
this pull request
Oct 6, 2021
The naming scheme of containers created by Compose has changed in V2. Ref. docker/compose#8655
Lastro10
reviewed
Oct 27, 2021
| }) | ||
|
|
||
| t.Run("check container names", func(t *testing.T) { | ||
| res := c.RunDockerCmd("ps", "--format", "{{.Names}}") |
|
@ |
|
``pkg/e2e/restart_test.go |
Member
|
Reported the account above for abuse/spam |
3 tasks
3 tasks
DanBrown47
pushed a commit
to DanBrown47/docker-elk
that referenced
this pull request
Jun 22, 2023
The naming scheme of containers created by Compose has changed in V2. Ref. docker/compose#8655
k-ishigaki
added a commit
to k-ishigaki/review-template
that referenced
this pull request
Aug 27, 2023
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.
This is a proposal to fix long running issue #229
tl;dr:
docker-compose creates containers as
project_service_numberwhich make them invalid hostnames. Most tools support this mistakes, but some don't.As we move to Compose V2, we have a unique opportunity to fix this with a minor backward compatibility break. Maybe we could have this controlled by some COMPOSE_COMPATIBILITY env variable, and/or resurrect the --compatibility flag
Resolves #229