-
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
The default naming scheme for containers created by Compose #6316
Comments
Unfortunately no, sorry. |
Same thing here. This slug feature should be optional. How hard it's to pass a flag on the up or build command to turn it off? |
I agree - this should be optional. Several programs making use of Docker Compose now only run if you downgrade to 1.22. |
I agree, this should be optional. We don't need this slug feature at all and a lot of bash-scripts are using old naming format. |
Same for us, we must stay on 1.22 as we use "volumes from" feature and rely on old naming scheme. Please, make it optional feature in 1.24. |
This feature makes it difficult to refer to the containers after they've been upped. |
I don't get the point of this change. Currently neither docker nor compose offer any service discovery. So, if I want to get a hostname from inside the container, what am I supposed to do? Roll my own service discovery? BTW, what are benefits of this change? Is it really worth breaking backward compatibility? |
The default _slug name change is the correct approach, but not having a way to disable it via an environment variable or command line option breaks a lot of existing workflows. Please consider this a feature request to add a flag of some sort to bring back <= 1.22.0 docker-compose naming behavior. |
Sorry, but "external_links" are unusable now. I have to know the name of a container to link it. |
@shin- this new behavior completely ruins a lot. Before that random
And that's it. Now, this won't work at all. How this thing is not optional at least? |
This comment has been minimized.
This comment has been minimized.
So, there is a workaround. @shin- please, don't consider this a bug report about |
This comment has been minimized.
This comment has been minimized.
While I understand the incentive behind the change, it is highly disrupting, especially since there is no grace period to at least give developers time to adjust their script. Lots of scripts were written with this naming convention in mind which existed literally forever. Basically this change makes docker-compose 1.23 non-backwards compatible with any other docker-compose. |
@shin- You personally and all the docker-compose and docker team should learn already what backward incompatible change is and how to bring it to a widely adopted project the entire industry relies on. First, backward incompatible change is not about you breaking what you've guaranteed earlier to not to. Nobody cares if this thing is used by nobody. Backward incompatible change is when you break something your user base actually rely on. And it doesn't matter what guarantees were because it's Apache 2.0 after all and the entire project Second, you should learn how to introduce such a change to your user base. This "random suffix thing" definitely breaks the way your users use
Third, @shin- , you personally should learn how to talk to people who are not direct contributors to your project and who are just your users but at the same time they are very busy people who are loyal to your project enough to invest their precious time filing requests and participating in discussions here with the only hope to bring some sense to the project future development and to try to avoid investing more resources in the migration away to another solution. Fourth, Docker team is trying to make money out of the Docker but it is not about Docker itself. The only way Docker can be a good thing to pay for is if the entire Docker infrastructure proofs it's worth it to pay. I don't see how it is a product oriented to user success if the development team turns its back to the community most of the time. Fifth, once again, we all here are your colleges and friends rather than enemies and we are really trying to help you with all this. And because we are your friends the exodus from the docker stack will be painful but in the way, it goes now, that farewell doesn't look unrealistic at all. |
This is a terrible implementation of a major version-breaking change, it completely breaks the ability to deploy our framework and I cannot even imagine how many others will experience the same exact issue, with absolutely zero advance warning; unless someone manually goes looking for the latest changelogs for docker, they'd have no idea about this, and I imagine most people won't do that |
@shin- This change is highly disruptive to existing workflows and there should be a flag provided to not generate slugs. Thousands of hours of development time has gone into writing scripts and automating services which rely on docker-compose's predictability. Without proper service discovery, what is the team's plan for allowing automated targeting of individual containers? |
I tried to use My |
Hey all, a few general comments that I hope address some of the concern expressed here:
Let me know if there's anything that isn't addressed here. I understand that this is a major speed bump for a lot of you and tempers may flare when we're dealing with unforeseen circumstances. Take the time you need to go through the upgrade and pin your Compose version for the time being. Happy to help with questions like "How do I do XYZ without predictable names?" until then, in this thread or on Slack. And please be considerate in the way you interact with others on these forums, double-check that the information you're sharing is correct (I've already seen a couple of threads getting mentioned or redirected there that had nothing to do with this change, which creates an unnecessary sense of alarm and doesn't help the people with the problem who are getting misdirected here), and don't derail the conversation. Thank you for your time and patience. |
On the communications part, I would expect a change like this to be communicated and explained through some communications channel beforehand, basically in the way you just did it here in this thread, explaining why, and what to do for now, but doing it before all the aftermath. |
@shin- You haven't read my last comment and links I've provided, have you? The last one from you looks kind but feels the same.
TL;DR
The changelog is a thing for contributors. Users don't read it. A user installs
I have a good news for you. You already have guaranteed "don't make any breaking change ever, or let me opt out of all of them indefinitely". And more, you have a feature for this. It's the
Please, provide the solution for This is a popular way your users use your project. Most of your users use docker-compose for the local development. Often one has several interconnected projects in development. In such a case it is a common practice to direct several docker-compose files to the same network and to define |
This comment has been minimized.
This comment has been minimized.
Already did, please refer to my earlier comment:
The rest of your post is needlessly adversarial and I won't respond to it. I'm here and willing to have a discussion, but I don't have to take your bullying. |
This comment has been minimized.
This comment has been minimized.
Needed because of change in recent versions of docker-compose, more info here: docker/compose#6316
It seems this change makes the For example, multiple service instances as upstream servers for Nginx. Edit: see #6365 for further informations |
Wow, what an awful change. 👎 How are we supposed to get the randomly generated string for use in scripts? |
I ran into this issue as well and would like to express my recommendation for future backwards incompatible changes. We too have scripts relying on the project_service_index format, with many people using those scripts on Mac. In an ideal world, we would be able to control the version of Docker for Mac that people use, but for now people upgrade when the auto-upgrade dialog appears. My issues and recommendations are:
The key takeaway here is most of the world assumes a container naming scheme that is fundamental to their use of docker compose, and changing the default behavior without an obvious deprecation strategy can be detrimental to these workflows. People don’t always use software exactly the way it was intended, and the ownership is on those people to fix things when their assumptions fail. However, a few simple communications can help us prepare for future changes and would help motivate us to move to the latest best practices. |
If you previously depended on You have to use However, you can't use The previously-readable
This was a poorly thought-out change. |
@jtreminio FWIW, from the project you can still do |
Thanks to everyone who took time to share their thoughts on the change. We agree this was poorly handled and a bit overzealous on our part, and it has been partially reverted in Compose 1.23.2 (we're keeping random suffixes for containers created by Let me know if there are any outstanding issues that need to be addressed. |
Is there any plan to add either a command line option to turn this off |
|
It was only reverted for |
Thank you for the fast resolve of this!!
… On Nov 28, 2018, at 8:09 PM, Joffrey F ***@***.***> wrote:
Thanks to everyone who took time to share their thoughts on the change. We agree this was poorly handled and a bit overzealous on our part, and it has been partially reverted in Compose 1.23.2 (we're keeping random suffixes for containers created by docker-compose run, which lets us handle these more gracefully: #4688 #4549 #5240, as was initially intended).
Let me know if there are any outstanding issues that need to be addressed.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@shin- I presume that this will be returned at some point - possibly in 1.24 (since it is such a breaking change?). If so, could you work with the community to understand and recommend alternative lightweight mechanisms for people who were using these without slugs? Not sure about the best place to have that conversation. |
This is a bug not a feature. |
Is there any way to disable this behavior apart from using
container_name
in yaml file?We have many scripts that rely on container names and are not using swarm, just a single container stack. This change is very inconvenient for us.
The text was updated successfully, but these errors were encountered: