BAEL-5633 - dockersing a simple java jar (#12454)
This commit is contained in:
parent
2823129540
commit
58c7385029
|
@ -0,0 +1,4 @@
|
|||
FROM openjdk:11
|
||||
MAINTAINER baeldung.com
|
||||
COPY target/docker-java-jar-0.0.1-SNAPSHOT.jar app.jar
|
||||
ENTRYPOINT ["java","-jar","/app.jar"]
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>docker-java-jar</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>com.baeldung.HelloWorld</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
package com.baeldung;
|
||||
|
||||
public class HelloWorld {
|
||||
|
||||
public static void main(String[] args){
|
||||
System.out.println("Welcome to our application");
|
||||
}
|
||||
}
|
|
@ -23,6 +23,7 @@
|
|||
<module>docker-images</module>
|
||||
<module>docker-spring-boot</module>
|
||||
<module>docker-spring-boot-postgres</module>
|
||||
<module>docker-java-jar</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
|
Loading…
Reference in New Issue