Mounting Volume as part of a multi-stage build : <p>How can I mount a volume to store my .m2 repo so I don't have to download the internet on every build?</p>

<p>My build is a Multi stage build:</p>

<pre><code>FROM maven:3.5-jdk-8 as BUILD

COPY . /usr/src/app
RUN mvn --batch-mode -f /usr/src/app/pom.xml clean package

FROM openjdk:8-jdk
COPY --from=BUILD /usr/src/app/target /opt/target
WORKDIR /opt/target

CMD ["/bin/bash", "-c", "find -type f -name '*.jar' | xargs java -jar"]
</code></pre>
