-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
define compose container names with a valid hostname #8655
Conversation
62ded22
to
aca0d49
Compare
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just add a test with the --compatibility
870bae3
to
031b74e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Nicolas De Loof <[email protected]>
031b74e
to
497b25f
Compare
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. |
The naming scheme of containers created by Compose has changed in V2. Ref. docker/compose#8655
}) | ||
|
||
t.Run("check container names", func(t *testing.T) { | ||
res := c.RunDockerCmd("ps", "--format", "{{.Names}}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/e2e/compose_test.go
@ |
``pkg/e2e/restart_test.go |
Reported the account above for abuse/spam |
The naming scheme of containers created by Compose has changed in V2. Ref. docker/compose#8655
The naming scheme of containers created by Compose has changed in V2. Ref. docker/compose#8655
This is a proposal to fix long running issue #229
tl;dr:
docker-compose creates containers as
project_service_number
which 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