Skip to content

Commit e193492

Browse files
committed
Adding ability for the build to use a podman cache
* This will save alot of time downloading maven artifacts Signed-off-by: Shawn Hurley <shawn@hurley.page>
1 parent be3f65c commit e193492

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN dnf install -y maven-openjdk17 && dnf clean all && rm -rf /var/cache/dnf
2323
WORKDIR /app
2424
COPY ./ /app/
2525
RUN export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
26-
RUN JAVA_HOME=/usr/lib/jvm/java-17-openjdk mvn clean install -DskipTests=true
26+
RUN --mount=type=cache,id=m2_repo,uid=1001,target=/root/.m2 JAVA_HOME=/usr/lib/jvm/java-17-openjdk mvn clean package -DskipTests=true
2727

2828
FROM registry.access.redhat.com/ubi9/ubi-minimal AS index-download
2929
RUN microdnf install -y wget zip && microdnf clean all && rm -rf /var/cache/dnf
@@ -49,7 +49,7 @@ COPY ./gradle/build.gradle /usr/local/etc/task.gradle
4949
COPY ./gradle/build-v9.gradle /usr/local/etc/task-v9.gradle
5050

5151
COPY --from=jdtls-download /jdtls /jdtls/
52-
COPY --from=addon-build /root/.m2/repository/io/konveyor/tackle/java-analyzer-bundle.core/1.0.0-SNAPSHOT/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar /jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/
52+
COPY --from=addon-build /app/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar /jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/
5353
COPY --from=fernflower /output/fernflower.jar /bin/fernflower.jar
5454
COPY --from=maven-index /maven.default.index /usr/local/etc/maven.default.index
5555
COPY --from=index-download /maven-index-data/central.archive-metadata.txt /usr/local/etc/maven-index.txt

0 commit comments

Comments
 (0)