首页 > 解决方案 > 从 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 或者我应该怎么做才能使用参数执行

标签: javamavendockerfile

解决方案


推荐阅读