Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Commit

Permalink
Add Docker BuildKit Maven caches.
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradHoeffner committed Apr 22, 2022
1 parent 568cab7 commit cf19ecc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ols-apps/ols-config-importer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
FROM maven:3.6-jdk-8 AS build
RUN mkdir /opt/ols
COPY . /opt/ols/
COPY build-fix/. /root/.m2/repository/
RUN cd /opt/ols && ls && mvn clean package -DskipTests
COPY build-fix/. /root/build-fix
RUN --mount=type=cache,target=/root/.m2 cp -r /root/build-fix/* /root/.m2/repository/ && cd /opt/ols && ls && mvn clean package -DskipTests

FROM openjdk:8-jre-alpine
RUN apk add bash
Expand Down
5 changes: 2 additions & 3 deletions ols-apps/ols-indexer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

FROM maven:3.6-jdk-8 AS build
RUN mkdir /opt/ols
COPY . /opt/ols/
COPY build-fix/. /root/.m2/repository/
RUN cd /opt/ols && ls && mvn clean package -DskipTests
COPY build-fix/. /root/build-fix
RUN --mount=type=cache,target=/root/.m2 cp -r /root/build-fix/* /root/.m2/repository/ && cd /opt/ols && ls && mvn clean package -DskipTests

FROM openjdk:8-jre-alpine
RUN apk add bash
Expand Down
5 changes: 2 additions & 3 deletions ols-web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

FROM maven:3.6-jdk-8 AS build
RUN mkdir /opt/ols
COPY . /opt/ols/
COPY build-fix/. /root/.m2/repository/
RUN cd /opt/ols && ls && mvn clean package -DskipTests
COPY build-fix/. /root/build-fix
RUN --mount=type=cache,target=/root/.m2 cp -r /root/build-fix/* /root/.m2/repository/ && cd /opt/ols && ls && mvn clean package -DskipTests

FROM openjdk:8-jre-alpine
RUN apk add bash
Expand Down

0 comments on commit cf19ecc

Please sign in to comment.