I'm trying to run tests of a spring boot application when it writes to mongodb using the testcontainers test library. Testcontainers should spin up a Docker image running mongodb. Then I run my test, it connects to the data store, writes something and I have assertions that make sure the stuff got stored. Then it all goes away.
The test needs to run on a Jenkins build agent (on Red Hat Linux 7.5) inside our corporate network which is pretty well locked down.
We have Artifactory set up with a proxy to docker hub. When I normally do a docker login I give it https://artifactory.example.com or just do docker run with "artifactory.example.com/docker-all/image:1.2.3"
The log on the Jenkins run has this in it:
00:02:13.052 2019-05-22 00:15:59.647 INFO 83570 --- [ main] o.t.d.DockerClientProviderStrategy : Found Docker environment with Environment variables, system properties and defaults. Resolved:
00:02:13.052 dockerHost=unix:///var/run/docker.sock
00:02:13.052 apiVersion='{UNKNOWN_VERSION}'
00:02:13.052 registryUrl='https://index.docker.io/v1/'
00:02:13.052 registryUsername='cicduser'
00:02:13.052 registryPassword='null'
00:02:13.052 registryEmail='null'
00:02:13.052 dockerConfig='DefaultDockerClientConfig[dockerHost=unix:///var/run/docker.sock,registryUsername=cicduser,registryPassword=<null>,registryEmail=<null>,registryUrl=https://index.docker.io/v1/,dockerConfigPath=/home/cicduser/.docker,sslConfig=<null>,apiVersion={UNKNOWN_VERSION},dockerConfig=<null>]'
Question: I don't know how to get the registryUrl listed there to be "https://artifactory.example.com/docker-all" and the registryUsername and registryPasswords set correctly (if our Artifactory gets locked down for reads).
There is lots of info to find online about using an HTTP proxy providing access to the internet at large. I think I have found how to do that. But that's not what I need to do.