【发布时间】:2020-02-02 14:40:52
【问题描述】:
我想通过 maven 运行 stilliard/pure-ftpd。所以当我运行mvn clean install 时,docker 镜像会启动,我的 IT 测试可以与 docker 镜像进行通信。
这就是我的 pom.xml.file 的样子
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare-it</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
<configuration>
<images>
<image>
<alias>rabbitmq</alias>
<name>rabbitmq:3-management-alpine</name>
<run>
<ports>
<port>${rabbitmq.port}:5672</port>
<port>${rabbitmq-management.port}:15672</port>
</ports>
<wait>
<http>
<url>http://${rabbitmq.host}:${rabbitmq-management.port}</url>
<method>GET</method>
<status>200..399</status>
</http>
<time>30000</time>
</wait>
</run>
</image>
<image>
<alias>sftp</alias>
<name>stilliard/pure-ftpd</name>
<run>
<cmd>${sftp.username}:${sftp.password}:::${sftp.directory}</cmd>
<ports>
<port>${sftp.port}:21</port>
</ports>
<wait>
<time>10000</time>
</wait>
</run>
</image>
</images>
</configuration>
</execution>
<execution>
<id>remove-it</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
除了 ftp 服务器,一切都开始了。我在运行mvn clean install时收到此消息
[INFO] DOCKER> [stilliard/pure-ftpd] "sftp": Start container c40ccb9d35e7
[ERROR] DOCKER> Error occurred during container startup, shutting down...
[INFO] DOCKER> [rabbitmq:3-management-alpine] "rabbitmq": Stop and removed container afbc982dc61b after 0 ms
[ERROR] DOCKER> I/O Error
我缺少什么,以便我可以得到stilliard/pure-ftpd start。
【问题讨论】:
标签: java maven docker ftp integration-testing