1. Try to use a private registry in the Image id/tag. eg:
2. Setup the credentials for Docker registry credentials.
3. Run the project
It fails to pull the image
Error: Status 403 trying to pull repository my-bucket/ubuntu: "
Look closer to the .dockercfg generated on the host: It's always: https://index.docker.io/v1
It seems in the plugin code that when it creates the registryEndpoint, it call with 'null' on URL:
this.registryEndpoint = new DockerRegistryEndpoint(null, credentialsId);
And the docker-common will use its default index.docker.io/v1 instead of the one defined in image tag.
I'm not sure how it will work, it seems the code is setting up the credential first and then pull in the container image, so the image ID is never consulted when it tries to create the registryEndpoint, so it seems it will always be the default index.docker.io/v1.
We are actually not using private registry, but a different public one, like quay.io, and it's not working because of this.
I thought it's supported because it's coming from the help:
........ or the Docker image you have configured for this build do point to a private registry "docker.mycompany.com/my-bucket/ubuntu:secret-version" - either as an image ID or parent FROM reference in Dockerfile - then specify the registry credentials here so docker command line client is configured accordingly and can pull from this registry.
(from CloudBees Docker Custom Build Environment Plugin)