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
When using docker, I'm able to run two containers from the same image, and link them both on a third container from another image.
For example, imagine the scenario where you are running some application and you want it to communicate with two Cassandra nodes:
$ docker run --name cassandra_1 -d cassandra:2.1.5
$ docker run --name cassandra_2 -d cassandra:2.1.5
$ docker run --name base -d --link cassandra_1:cassandra_1 --link cassandra_2:cassandra_2 -it centos:centos6 top -b
From the "base" container, we can now access both Cassandra nodes:
i just took a look at this and they appear to be the same.
based on what i see, this has something to do w/ the plugin using the image name to match against instead of relying on the specified alias (similar to #87, although using labels won't fix this problem).
i should have some time later tonight to dig deeper.
i have a fix for this. part of the 'problem' is the plugin is too flexible and allows an alias to be optional and lets you specify links and volumes using an image name or an alias. if you specified an alias, the underlying code tracked that against an image name, so if you had more then one container running under the same image, the entries would get overwritten in the map.
Hi,
When using docker, I'm able to run two containers from the same image, and link them both on a third container from another image.
For example, imagine the scenario where you are running some application and you want it to communicate with two Cassandra nodes:
From the "base" container, we can now access both Cassandra nodes:
See the details of the base image on the gist (inspect_native_2 file): https://gist.github.com/Pitxyoki/adba7fe14fc39e2d1514#file-inspect_native_2
However, I'm not being able to achieve the same with docker-maven-plugin. See the project on the gist: https://gist.github.com/Pitxyoki/adba7fe14fc39e2d1514#file-test_project-patch
Apply on an empty dir with
git apply test_project.patch
and execute the following:Notice that only one of the IPs is there and the hostnames seem to be mangled.
This makes it impossible to reach both Cassandra nodes.
More details on the gist: inspect_plugin_2: https://gist.github.com/Pitxyoki/adba7fe14fc39e2d1514#file-inspect_plugin_2
Reducing this to a simpler case might help (?):
See inspect_native_1.txt: https://gist.github.com/Pitxyoki/adba7fe14fc39e2d1514#file-inspect_native_1
See inspect_plugin_1: https://gist.github.com/Pitxyoki/adba7fe14fc39e2d1514#file-inspect_plugin_1
This seems like a current limitation/bug of the plugin but please tell me if I'm doing something wrong.
Thank you.
The text was updated successfully, but these errors were encountered: