I've an image which needs to connect to a repository in runtime, but it seams that Docker container is not able to read ~/.m2/settings.xml file located in host machine.
Is there any way to let docker now where maven configuration file is located? Or actually import the maven configuration file to the container?
You can do this by creating a volume mapping
docker run ... -v /path/on/host/settings.xml:/home/me/.m2/settings.xml ....
see also the following example where the repository is run within a container and accessed via a link:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With