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

Commit cf19ecc

Browse files
Add Docker BuildKit Maven caches.
1 parent 568cab7 commit cf19ecc

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

ols-apps/ols-config-importer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
FROM maven:3.6-jdk-8 AS build
33
RUN mkdir /opt/ols
44
COPY . /opt/ols/
5-
COPY build-fix/. /root/.m2/repository/
6-
RUN cd /opt/ols && ls && mvn clean package -DskipTests
5+
COPY build-fix/. /root/build-fix
6+
RUN --mount=type=cache,target=/root/.m2 cp -r /root/build-fix/* /root/.m2/repository/ && cd /opt/ols && ls && mvn clean package -DskipTests
77

88
FROM openjdk:8-jre-alpine
99
RUN apk add bash

ols-apps/ols-indexer/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
21
FROM maven:3.6-jdk-8 AS build
32
RUN mkdir /opt/ols
43
COPY . /opt/ols/
5-
COPY build-fix/. /root/.m2/repository/
6-
RUN cd /opt/ols && ls && mvn clean package -DskipTests
4+
COPY build-fix/. /root/build-fix
5+
RUN --mount=type=cache,target=/root/.m2 cp -r /root/build-fix/* /root/.m2/repository/ && cd /opt/ols && ls && mvn clean package -DskipTests
76

87
FROM openjdk:8-jre-alpine
98
RUN apk add bash

ols-web/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
21
FROM maven:3.6-jdk-8 AS build
32
RUN mkdir /opt/ols
43
COPY . /opt/ols/
5-
COPY build-fix/. /root/.m2/repository/
6-
RUN cd /opt/ols && ls && mvn clean package -DskipTests
4+
COPY build-fix/. /root/build-fix
5+
RUN --mount=type=cache,target=/root/.m2 cp -r /root/build-fix/* /root/.m2/repository/ && cd /opt/ols && ls && mvn clean package -DskipTests
76

87
FROM openjdk:8-jre-alpine
98
RUN apk add bash

0 commit comments

Comments
 (0)