The docker image cannot be pushed to the private repository.Can anyone give me some suggestions?
Drone environment:
Drone Server(drone/drone:1.9.0) on Kubernetes With Helm.
Drone Runner(drone/drone-runner-kube:1.0.0-beta.6) on Kubernetes With Helm.
Successfully tagged 75d8854821003cb47dd8b8b29eb652b8fdd6264b:latest
+ /usr/local/bin/docker tag 75d8854821003cb47dd8b8b29eb652b8fdd6264b 172.16.0.10:7787/ufx/testapi:feature_cicd-6
+ /usr/local/bin/docker push 172.16.0.10:7787/ufx/testapi:feature_cicd-6
The push refers to repository [172.16.0.10:7787/ufx/testapi]
time=“2021-05-26T12:14:54.214587108Z” level=info msg=“Attempting next endpoint for push after error: Get https://172.16.0.10:7787/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)”
time=“2021-05-26T12:15:09.214885416Z” level=info msg=“Attempting next endpoint for push after error: Get http://172.16.0.10:7787/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)”
Get http://172.16.0.10:7787/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
time=“2021-05-26T12:15:09Z” level=fatal msg=“exit status 1”
Could you please pass username and password as docker_usernameanddocker_password, The docker plugin expects secrets named docker_usernameanddocker_password` and test the behaviour.
Thanks Reply.
I use the private repository made by nexus3 oss.So docker_username === nuget_username and docker_password === nuget_password.The values of these variables are equal.
If it’s feasible for you, could you try pushing an image to the Docker registry on the same machine running the Drone Docker runner?
Edit: Could you make sure the repository has privileged mode on? You can also mount the Docker socket directly from /var/run/docker.sock in your pipeline if your system runs Ubuntu.
Thanks very much.
When I changed drone runner on docker and used docker pipeline ,It’s working well!
So,I guess there may be some problems with the drone runner on kubernetes