How do I make my Maven Docker image look for it’s dependencies/parent in Nexus?

  docker, dockerfile, maven, nexus, parent-pom

I’m trying to use a Maven Docker image to build a project. The pom of the project has it’s parent in a Nexus repository. When I build the project, it says that the parent pom is not resolvable since it doesn’t look for it in Nexus. How do I make the image look in Nexus? I am able to build the same project locally on my machine using the Maven installation.

This is what my Dockerfile looks like:

FROM maven:3.6.3-amazoncorretto-11
COPY settings.xml /usr/share/maven/ref/
CMD ["mvn","-v"]

Source: Docker Questions