Skip to content

Commit

Permalink
Switch from Maven Docker build to manual build
Browse files Browse the repository at this point in the history
  • Loading branch information
meonwax committed Apr 25, 2024
1 parent 9f9703c commit f6f85df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 57 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore everything
*

# Allow explicitly
!/target
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
FROM openjdk:10.0.1-jdk-slim
RUN apt-get update && apt-get install -y libtcnative-1 && rm -rf /var/lib/apt/lists/*
VOLUME /tmp
ARG JAR_FILE
ADD /target/${JAR_FILE} app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/app.jar"]
FROM eclipse-temurin:8-jre-jammy
ADD target/predictr-*.jar app.jar
ENTRYPOINT ["java", "-Xms128m", "-Xmx1024m", "-jar", "/app.jar"]
51 changes: 0 additions & 51 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,57 +181,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>${dockerfile-maven-plugin.version}</version>
<executions>
<execution>
<id>build-and-tag-latest</id>
<phase>none</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
<execution>
<id>tag-version</id>
<phase>none</phase>
<goals>
<goal>tag</goal>
</goals>
<configuration>
<tag>${project.version}</tag>
</configuration>
</execution>
<execution>
<id>push-latest</id>
<phase>none</phase>
<goals>
<goal>push</goal>
</goals>
<configuration>
<tag>latest</tag>
</configuration>
</execution>
<execution>
<id>push-version</id>
<phase>none</phase>
<goals>
<goal>push</goal>
</goals>
<configuration>
<tag>${project.version}</tag>
</configuration>
</execution>
</executions>
<configuration>
<repository>meonwax/predictr</repository>
<buildArgs>
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
</configuration>
</plugin>
</plugins>

</build>
Expand Down

0 comments on commit f6f85df

Please sign in to comment.