error in docker build publish plugin

2019-07-21 20:28发布

问题:

Can you please help me for configuring the jenkins docker build publish plugin. I have setup artifactory for docker repo and trying to push image build from github docker file.

Following is the error I am getting :

Error response from daemon: Invalid registry endpoint https://     
https://artifactory.corp.inmobi.com/v1/: 
Get https:// https://artifactory.corp.inmobi.com/v1/_ping: dial tcp: unknown port tcp/. \
If this private registry supports only HTTP or HTTPS with an unknown CA certificate, \
please add `--insecure-registry  https:` to the daemon's arguments. \
In the case of HTTPS, if you have access to the registry's CA certificate, \
no need for the flag; simply place the CA certificate at /etc/docker/certs.d/ https:/ca.crt

Build step 'Docker build and publish' marked build as failure
Finished: FAILURE

回答1:

It is not related with Jenkins Docker build and publish plugin, see source code DockerBuilder.java, it will execute the docker command directly.

If you artifactory server (https://artifactory.corp.inmobi.com) is not official CA certificated, please check Remote access to a private docker-registry to enable it in your jenkins server (which has docker daemon)

Or ask your IT admin to apply official CA certification for https://artifactory.corp.inmobi.com