You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#2314 brought support for selecting a container based on the service name when using docker-compose (thanks 馃檶 !). However, the value it expects contains the "container number" (e.g. service_1), instead of just the service name, e.g. just service.
This does not match the behaviour of using docker-compose directly:
$ docker-compose ps agent
Name Command State Ports
--------------------------------------------------
myapp_agent_1 /bin/k3s agent Up
$ docker-compose ps agent_1
ERROR: No such service: agent_1
According to this test, it looks like the expected behavior, or maybe was incorrectly modeled.
Maybe using getServiceInstanceName from getContainerByServiceName would provide compatibility for both cases?
The text was updated successfully, but these errors were encountered:
I got hit by the same problem. To solve this I had to clone the private method getServiceInstanceName(String serviceName) to get the service instance name for a service name.
I have no idea how I can get the service instance name in any other way.
getServicePort() calls getServinceInstanceName in internally and therefore it works with both.
#2314 brought support for selecting a container based on the service name when using docker-compose (thanks 馃檶 !). However, the value it expects contains the "container number" (e.g.
service_1
), instead of just the service name, e.g. justservice
.This does not match the behaviour of using docker-compose directly:
According to this test, it looks like the expected behavior, or maybe was incorrectly modeled.
Maybe using
getServiceInstanceName
fromgetContainerByServiceName
would provide compatibility for both cases?The text was updated successfully, but these errors were encountered: