-
Notifications
You must be signed in to change notification settings - Fork 26
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
deploy replicas gives duplicate container name errors #359
Comments
Thanks @dustyroberts, we have added this to the backlog to investigate but likely won't get to it right away |
@dustyroberts. While we don't have an F5 debug solution for this yet, you should be able to debug multiple replicas by using the Container Tools Window in Visual Studio and attaching to each of the containers individually after you compose up. Visual Studio 2022 17.4 Preview 3 release now also has Docker Compose commands off of the Compose project context menu to make it easier to "Compose Up" the services. |
@dbreshears Yes, and one workaround is to have two entries for the application in the compose file and specifying different container names for each. Having it in the backlog is great, cause it would be nice to scale the same way docker does. Thanks |
Hey Guys, I'm currently doing a few tests and labs with haproxy, and in order to run my test I need to create multiple replicas with specific names per container, What I have in code is something like :
Now, I would expect that I will be able to use the parameter container_name, and each replica has a container_name but enumerated to avoid this issue, do you know if is there any workaround? .
In my case, this is needed to use this for my backend section of haproxy and point this to the different replicas Regards, |
@h3ct0rjs That behavior isn't from the VS tools: https://docs.docker.com/compose/compose-file/compose-file-v3/#container_name |
Well @NCarlsonMSFT I’m currently using VSTools but maybe you’re right this feature is more related to docker-compose itself. I will contact support . |
@NCarlsonMSFT Is right but if we remove the Looking at the command Visual Studio emits to up the containers I saw the following: The So, I believe this is a Visual Studio docker tools support bug and not a docker bug. |
Hey @Ewerton , Best Regards, |
I can confirm that this file is has a |
Just adding more info to it: |
Can't think in nothing specific right now. I always develop applications debugging then with more than one instance. This forces me to test, think, and prepare for scalability. |
This is not a bug, its merely a feature that is not implemented. As mentioned, they will add it to the backlog.
There are workarounds, like creating multiple entries in the yaml file, but the ideal way would be to make use of the scaling options that is supplied by docker. |
In a scenario where distributed caching is used, and one wants to debug and test multiple instances, as well as more real-life performance testing, manually scaling using separate services with different names is not ideal. |
Right now, I'm trying to find out how to implement scalable distributed computing. But there's a workaround, so I think this is not a big deal. |
Would be awesome to have this working. |
Hey folks, This is something we're working on getting implemented and I could use your help! If you could spare 15 minutes to walk me through your workflow and how you're planning to use replicas it would really help us prioritize our implementation and make sure we're helping you the right way. You can schedule a Teams call with me here: https://aka.ms/MeetWithMatt |
@fiveisprime Even though we're deploying out applications on Kubernetes, we're doing local development using Docker because we're having a hard time debugging on Kubernetes, specially those Worker Services. We have to test out the behavior of our applications from how it handles distributed computing to when it encounter errors. We also perform some stress-testing locally to see some possible issues, for example we found out that there's an issue on Nginx as reverse proxy to SignalR with backplane, having 5 instances of the SignalR application somehow the connection got refused. Through this, we can spot issues early before we spend more time on implementing something that may not work or issues that we can't resolve immediately. As of now, we debug with single instance of each application and hoping it will work. Then we'll create a docker-compose override for the replicas and execute it directly to docker, with cross-fingers that it will work as what we're expecting. Being able to debug with replicas and know which instance is having an issue will surely be helpful. |
I'm unable to book a meeting. What @eSPiYa mentioned above is a good scenario for the requested feature. |
@Ewerton, @Polemus, @eSPiYa, @Snazzie, @Danotsonof |
Just tried it. and it seems to be working nicely. all instances have debugger attached. |
Looking forward to trying it out. Internet is a bit slow, so will only get back with feedback tomorrow |
I test this with my old repo and it is working nicely. Thanks everybody at Microsoft. |
It would be great if support for replicas was added.
See https://stackoverflow.com/questions/73691746/docker-replicas-while-debugging-with-visual-studio-not-working-as-expected
The text was updated successfully, but these errors were encountered: