title: how to use local dependency for docker images?
body: <p>I have docker-compose with the following projects:<br />
  RabbitMQ management, producer and consumer,<br />
  producer and consumer (java springboot apps) share a maven dependency to common model api (3rd mini project containing POJOs used by producer and consumer).
  When I build everything locally with mvn and each dockerfile contains only copying jar and running the app everything works fine.</p>
  <p>I tried to use multi-stage dockerfile but there is an error stating my producer can't find dependency for model-api on maven-central (from where it downloads all other dependencies).</p>
  <p>I have tried using <code>RUN mvn dependency:go-offline</code> so it uses my local .m2/repo but no success, same error and still downloads dependencies from central.<br />
  How can I make it work?</p>