Docker Community Forums

Share and learn in the Docker community.

How to increase docker client timeout?

Dear All,

I’m using JFrog Artifactory as my docker registry and it was integrated with my company LDAP for authentication. Since there is some latency to my LDAP servers as it located in another data center, the login process takes some time. There is no issue with UI login. But when using from docker client it gets timed out as every docker client has a default 15sec timeout set.

If the login process takes more than 15sec it gets timeout at the client side with the below error message.

Get https://oneart.mycompany.com:8091/v2/: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

I tested completely it is getting timeout during to latency with LDAP login.

Is there a way I can increase the timeout at the client side? (Setting some env variables or command-line argument)

I also confirm issue but only with docker.io repository. I am able to pull images correctly from other repos like quay,io, gcr.io, elastic.co. Not sure how to reproduce the issue, sometimes images are pulled, sometimes not on different hosts. Docker is behind corporate ssl proxy.

~ $ docker version
Client:
 Version:      18.03.1-ce
 API version:  1.37
 Go version:   go1.9.4
 Git commit:   9ee9f40
 Built:        Thu Apr 26 04:27:49 2018
 OS/Arch:      linux/amd64
 Experimental: false
 Orchestrator: swarm

Server:
 Engine:
  Version:      18.03.1-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.4
  Git commit:   9ee9f40
  Built:        Thu Apr 26 04:27:49 2018
  OS/Arch:      linux/amd64
  Experimental: false