We have a set of legacy Gradle projects that I am working on migrating to building in Docker.
Unfortunately they download quite a bit of Maven artifacts from our internal Artifactory server for every build, which is rather slow when working remotely over VPN. Until we get that fixed properly, I would like to have a local dockerized Nexus3 mirroring Artifactory so I can cache them locally.
I have Nexus3 OSS running in my local Docker Desktop. I have set up manually two mirror against Artifactory with proper credentials, and one grouping them together, but I have to do this every time the container is recreated. As of now, this is all that is needed for our usage.
I would like to be able to preconfigure this in the Docker image somehow, instead, so our local configuration comes up and running without manual intervention. I'm fine with baking in my credentials locally. The REST API looks promising but will probably require manually running a script after Nexus is ready, which makes it a plan B.
Can this be done in Nexus3 OSS, and if so how?