How do I point a docker image to my .m2 directory for running maven in docker on a mac?
<p>When you look at the <a href="https://github.com/carlossg/docker-maven/blob/40cbcd2edc2719c64062af39baac6ae38d0becf9/jdk-7/Dockerfile" rel="noreferrer">Dockerfile for a maven build</a> it contains the line:</p>

<pre><code>VOLUME /root/.m2
</code></pre>

<p>Now this would be great if this is where my <code>.m2</code> repository was on my mac - but it isn't - it's in</p>

<pre><code>/Users/myname/.m2
</code></pre>

<p>Now I could do:</p>

<p>But then the linux implementation in Docker wouldn't know to look there. I want to map the linux location to the mac location, and have that as part of my <code>vagrant init</code>. Kind of like:</p>

<pre><code>ln /root/.m2 /Users/myname/.m2
</code></pre>

<p>My question is: <strong>How do I point a docker image to my .m2 directory for running maven in docker on a mac?</strong></p>