Я продолжаю получать сообщение «Отказано в соединении», что, как я полагаю, связано с тем, что в Jenkins одновременно выполняется несколько заданий, и обе сборки вызывают один и тот же образ Docker, его вызов - образ «my-mysql»
Как сделать образ my-mysql уникальным для каждой сборки в файле pom.xml
Вот часть файла pom.xml, чтобы помочь
<profile>
<id>docker</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<verbose>true</verbose>
<images>
<image>
<name>my-app:${revision}</name>
<alias>my-app</alias>
<run>
<namingStrategy>alias</namingStrategy>
<dependsOn>
<container>my-mysql</container>
</dependsOn>
<links>
<link>my-mysql:</link>
</links>
<ports>
<port>8090:8090</port>
</ports>
<env>
<MYSQL_HOST>my-mysql</MYSQL_HOST>
</env>
<wait>
<!--<log>Started
FISApplication</log>-->
<time>30000</time>
</wait>
</run>
</image>
<image>
<name>mysql:5.6</name>
<alias>my-mysql</alias>
<run>
<ports>
<port>3306:3306</port>
</ports>
<env>
<MYSQL_ROOT_PASSWORD>root</MYSQL_ROOT_PASSWORD>
</env>
<wait>
<time>10000</time>
</wait>
</run>
</image>
</images>
</configuration>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<!-- "build" should be used to create
the images with the artifact -->
<goal>stop</goal>
<goal>build</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<!-- "build" should be used to create the images with the artifact -->
<goal>stop</goal>
<goal>build</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
<goal>cleanup</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>