Open jakub-bochenski opened 6 years ago
self note: maybe I need to use the +
workaround https://dmp.fabric8.io/#implicit-properties
@jakub-bochenski yes, it could be really that the post-interpolation that we have to do when we know the ip fails because Maven already replaced the empty property with an empty string.
But it could be also something different, however you should try to prefix you property with a + if its the only part of the config value.
@rhuss the + workaround doesn't help The log is now:
[INFO] DOCKER> [mysql:5.7] "psb-mysql": Waiting for ports [3306] directly on container with IP (+${docker.container.psb-mysql.net.psb-all.ip}).
and the check simply times out (probbably because it tries to use +${docker.container.psb-mysql.net.psb-all.ip}
string as IP.
Also: is it expected that ${docker.container.psb-mysql.ip}
is not defined when using custom networks? There is nothing about it in the docs
I am running into the exact same problem. Waiting on a TCP port using direct mode does not work on a custom network :-(
Same problem here. Is there anything I can help to solve it? It currently blocks us running integration tests at all.
Edit: it's not just the wait
that doesn't work. The variable for the container's IP address is not filled with any value at all, also for subsequent plug-ins.
Edit: Using docker.container.<alias>.net.<network>.ip
works in subsequent plug-ins but not in wait
.
Here I've made a fix for custom network IP to be set. Maybe it also fixes this issue as well.
@dantalian-pv why not send a PR then?
@jakub-bochenski I did.
There is no feedback about my pull request, except some sonar-pr stuff, with which I don't know what to do (It shows [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project docker-maven-plugin: The preview mode, along with the 'sonar.analysis.mode' parameter, is no more supported. You should stop using this parameter. -> [Help 1]
).
This looks like an infra problem with the circleci build setup for this repo. I can't offer anything better than trying to ping @rhuss to do something about it.
Just found a seemingly related PR merged last December https://github.com/fabric8io/docker-maven-plugin/pull/1130
Description
Related to #703 but I'm not using
autoCreateCustomNetworks
I can use wait with
<network><mode>bridge</mode></network>
, it works if I add<host>${docker.container.psb-mysql.ip}</host>
to<wait>
.I can't get it to work using
<mode>custom</mode>
. In that case${docker.container.psb-mysql.ip}
is not defined at all. When I try to use<host>${docker.container.psb-mysql.net.psb-net.ip}</host>
it seems that property is also not defined at this time.I can see
docker.container.psb-mysql.net.psb-net.ip
is defined when I later dump it withwrite-project-properties
The only way I can get it to work is to enter the ip (
172.17.0.2
) directly in the pom.xml, but that is not practical.Info
mvn -v
) : 3.5.2