Skip to content

Commit

Permalink
Merge pull request #6 from longgt/fix/docker-build
Browse files Browse the repository at this point in the history
Fix Docker build
  • Loading branch information
longgt authored Jun 7, 2024
2 parents 0f67ad7 + 272dd98 commit 1d162a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM maven:3.9.7-eclipse-temurin-17 AS builder
COPY . /build
WORKDIR /build
# Build the app
# Artifact will be stored at /build/target/json-web-key-generator-1.0.0-SNAPSHOT-jar-with-dependencies.jar
# Artifact will be stored at /build/target/json-web-key-generator-jar-with-dependencies.jar
RUN mvn package

# Build the image with the new .jar binary
Expand All @@ -15,5 +15,5 @@ ARG GIT_TAG=unspecified
LABEL org.opencontainers.image.authors="Besmir Zanaj"
LABEL org.opencontainers.image.revision=$GIT_COMMIT
LABEL org.opencontainers.image.version="$GIT_TAG"
COPY --from=0 /build/target/json-web-key-generator-1.0.0-SNAPSHOT-jar-with-dependencies.jar ./json-web-key-generator.jar
COPY --from=0 /build/target/json-web-key-generator-jar-with-dependencies.jar ./json-web-key-generator.jar
ENTRYPOINT ["java", "-jar", "json-web-key-generator.jar"]
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.mitre</groupId>
<artifactId>json-web-key-generator</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>json-web-key-generator</name>
Expand Down Expand Up @@ -59,6 +59,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
Expand All @@ -74,6 +75,7 @@
</manifestEntries>

</archive>
<finalName>json-web-key-generator</finalName>
</configuration>
<executions>
<execution>
Expand Down

0 comments on commit 1d162a3

Please sign in to comment.