I'm trying to build a Docker image that was able to use a Nexus repository, installed in my notebook, when it executes the command RUN mvn package
. I added this line to my pom.xml:
<repositories>
<repository>
<id>maven-group</id>
<url>http://localhost:8081/repository/maven-group/</url>
</repository>
</repositories>
However, localhost should be replaced with the hostname where Nexus is running, but it's on container host (my personal machine). What should I write in the url to point to my repo? My notebook hostname does not resolve from within the container. Or is there any other way to connect to my Nexus repository?