+ /usr/local/bin/docker tag ff83ce1877c5487fe3491faedc195aad77042fdc registry.halfakop.ru:5000/tbftpro/swagger:latest
+ /usr/local/bin/docker push registry.halfakop.ru:5000/tbftpro/swagger:latest
The push refers to repository [registry.halfakop.ru:5000/tbftpro/swagger]
Get https://registry.halfakop.ru:5000/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
time="2018-10-31T20:13:27Z" level=fatal msg="exit status 1"
It seems the docker container has no network at this time. How to fix this issue?
How to debug this container?
I cannot speak to your network configuration or network problems, but I can see that secrets are incorrect. The docker plugin expects secrets named docker_username and docker_password [1].
I have changed secrets names to docker_username and docker_password and got: time="2018-11-01T05:43:10Z" level=fatal msg="Error authenticating: exit status 1"
But the following works fine:
curl -X GET -u $DOCKER_USERNAME:$DOCKER_PASSWORD https://registry.halfakop.ru:5000/v2/
How to debug the container? How to use drone CLI?
$ docker ps | grep drone
a3987e1c0c46 drone/agent:0.8 "/bin/drone-agent" 10 hours ago Up 10 hours (healthy) 3000/tcp devenv_drone-agent_1
30ef1fa90a3d drone/drone:0.8 "/bin/drone-server" 10 hours ago Up 10 hours 80/tcp, 443/tcp, 0.0.0.0:9000->9000/tcp, 0.0.0.0:9080->8000/tcp devenv_drone-server_1
$ docker exec -it devenv_drone-server_1 sh
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: \"sh\": executable file not found in $PATH": unknown
$ docker exec -it devenv_drone-server_1 drone
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: \"drone\": executable file not found in $PATH": unknown
+ /usr/local/bin/docker push registry.halfakop.ru:5000/tbftpro/swagger:latest
The push refers to repository [registry.halfakop.ru:5000/tbftpro/swagger]
Get https://registry.halfakop.ru:5000/v2/: x509: certificate signed by unknown authority
time="2018-11-01T08:14:23Z" level=fatal msg="exit status 1"
The question is how to add custom certificate to the docker image?
+ /usr/local/bin/docker push registry.halfakop.ru:5000/tbftpro/swagger:latest
The push refers to repository [registry.halfakop.ru:5000/tbftpro/swagger]
Get https://registry.halfakop.ru:5000/v2/: x509: certificate signed by unknown authority
time="2018-11-01T08:14:23Z" level=fatal msg="exit status 1"