Hi guys, I'm working on [SCB-668 Using docker-compose file to start
Services from docker plugin in the Accept test] and encounter some
problems so I start this mail thread to discuss about them:

Problem 1:

There is a bug in fabric8 dmp plugin version 0.28.0 (currently used) :

If you define the container using external docker-compose file [1],
the number of containers it starts will be <number of plugin defined
containers> * <number of docker-compose file defined containers>,
which simply means there will be multiple duplicated containers in a
single docker:start run and cause failure.

Problem 2:

fabric8 dmp plugin doesn't support conditional depends_on, see this
issue [2]. Furthermore, conditional depends_on was add in compose file
version 2.1 [3] but removed in compose file version 3 [4]

For example fabric8 dmp doesn't support this:

depends_on:
  database:
    condition: service_healthy

Only support this:

depends_on:
  - database

Problem 3:

fabric8 dmp version >= 0.29.0 solved bug mentioned in problem 1, but
the tcp wait on port always failing (see this issue [5])

Problem 4:

Compose file overwrites configurations defined in dmp plugin.

For example, alpha server JAVA_OPTS env variable in demo project is:
JAVA_OPTS=-Dspring.profiles.active=prd

In Acceptance Tests pom.xml is:
<JAVA_OPTS>-Dspring.profiles.active=prd,test</JAVA_OPTS>

As described in dmp doc [6], <run> configuration is used as defaults
and are overwritten by configuration defined in docker-compose file.
That means the final effective profile only include prd, not prd and
test.

[1]: https://dmp.fabric8.io/#docker-compose
[2]: https://github.com/fabric8io/docker-maven-plugin/issues/888
[3]: https://docs.docker.com/compose/compose-file/compose-file-v2/#depends_on
[4]: https://docs.docker.com/compose/compose-file/#depends_on
[5]: https://github.com/fabric8io/docker-maven-plugin/issues/1234
[6]: https://dmp.fabric8.io/#docker-compose

-- 
Daniel Qian

博客:https://segmentfault.com/u/chanjarster
github:https://github.com/chanjarster

Reply via email to