Skip to content

Commit

Permalink
caching maven build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebSLane committed May 30, 2024
1 parent 2d30d15 commit 193335f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,21 @@ RUN git submodule update --init --recursive
# Build Dependencies
#
WORKDIR /build/astm-http-lib
RUN mvn dependency:go-offline
RUN mvn clean install -DskipTests
RUN --mount=type=cache,target=/root/.m2 \
mvn dependency:go-offline
RUN --mount=type=cache,target=/root/.m2 \
mvn clean install -DskipTests

##
# Build Project
#
WORKDIR /build
ADD ./pom.xml /build/pom.xml
RUN mvn dependency:go-offline
ADD ./src /build/src
RUN mvn clean package -DskipTests
RUN --mount=type=cache,target=/root/.m2 \
mvn dependency:go-offline \
ADD ./src /build/src
RUN --mount=type=cache,target=/root/.m2 \
mvn clean package -DskipTests

##
# Run Stage
Expand Down

0 comments on commit 193335f

Please sign in to comment.