Why is Docker sometimes failing with 400s?

If your Docker client occasionally fails with 400 errors, it is likely a timeout issue with the reverse proxy. Depending on the reverse proxy, there may be several settings that control timeouts. The solution is typically to increase these timeout periods. The two most common reverse proxies are NGINX and Apache. 

NGINX

 proxy_read_timeout 900; # Typically applied to the Artifactory/Docker server block

 send_timeout 300; # Typically applied to the http server block

Apache

TimeOut 300

After you have made your changes to your configuration file, be sure to restart it before attempting the Docker operation again.

Docker Error

Although the exact error will vary based on the docker version, you can expect to see something like this:

Error: Status 400 trying to pull repository mbajor/ansible: "{n "errors" : [ {n "status" : 400,n "message" : "Unsupported docker v1 repository request for 'docker-local'"n } ]n}"