docker - 在集成测试用例中使用 Nexus 中存在的 docker 映像
问题描述
我们在我们的应用程序中使用 PostGIS 数据库,并希望将其用于由 maven-failsafe-plugin 运行的集成测试用例。
我想从 Nexus 存储库中提取数据库映像并在预集成阶段建立数据库,以便可以在测试用例中使用它。我尝试使用 docker-maven-plugin
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.35.0</version>
<executions>
<execution>
<id>start-postgis</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-postgis</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
<configuration>
<images>
<image>
<alias>postgis</alias>
<name>postgis</name>
<run>
<ports>
<port>7474</port>
</ports>
<wait>
<log>Starting...</log>
<time>20000</time>
</wait>
</run>
</image>
</images>
</configuration>
</plugin>
我有以下问题:在哪里指定要从 nexus 中提取的图像?我尝试研究 docker compose 但无法找到解决方案。
解决方案
推荐阅读
- windows - 将 CMake 与 IBM Rhapsody 一起使用(代码生成器)
- sql - SQL - 增加组号的窗口函数
- mysql - 如果我只知道用户名,如何使用 SQL 语句从网站获取数据?
- c++ - 将 uint8_t 与 C++ 中的十六进制进行比较
- android - 在 Android Chrome 上填充短信刚刚停止工作
- xcodeproj - 如何将框架引用添加到来自不同项目的框架
- jupyter-notebook - 如何检查 Jupyter 笔记本中的自定义单元格或行魔术代码?
- android - 如何从不同的片段更改谷歌地图相机
- git - Git 列出任意提交时跟踪的文件
- django - 禁止 (403) CSRF 验证失败。请求中止。Django 管理员