java - 从 maven jar 构建 docker 映像?
问题描述
这是我的 Dockerfile,用于从 maven JAR 创建 Docker 映像。我
DockerFile
FROM openjdk:8-jre-slim
MAINTAINER rajesh <rajesh.ganessan@letsventure.com>
ADD target/container-test.jar /usr/share/tag/container-test.jar
Pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/main/resources/TestRunner/testng.xml</suiteXmlFile>
</suiteXmlFiles>
<systemPropertyVariables>
<propertyName>${browser}</propertyName>
<propertyName>${email}</propertyName>
<propertyName>${password}</propertyName>
</systemPropertyVariables>
</configuration>
</plugin>
我已经提到应该执行哪个 xml 文件。我应该在 dockerfile 的入口点中提到什么来创建 dockerimage 或者我应该怎么做才能使用参数执行
解决方案
推荐阅读
- php - XAMPP 本地主机不工作,即使 apache 工作得很好
- ios - 使用您的自定义网站域名缩短 Swift iOS 中的 URL
- python - 从 Python 将变量传递给 bash 脚本
- kotlin - kotlin - 两列作为外键引用 Kotlin 和 Exposed 的两个主键
- php - 当单击在 vue js 中添加新行时,现在显示可搜索的下拉选项
- swift - 为什么在此代码运行时没有在蒸汽中创建枢轴条目?
- assembly - 不同的处理器具有不同的汇编语言代码,然后使用哪种语法来解决竞争性考试中的问题
- r - 通过 facet_zoom 对 1 个绘图进行多次放大
- html - 当 div 在顶部时隐藏边框
- python - TensorFlow 预期维度为 1,CategoricalCrossentropy 损失为 10 错误