Skip to content

Fix docker client intermittently failing to connect to unix socket

Arran Walker requested to merge ajwalker/fix-docker-connection-timeout into main

What does this MR do?

Only sets up docker client HTTP timeouts for remote connections.

Why was this MR needed?

On some API calls, the Docker client was failing to connect with Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

We believe this problem is narrowed down to setting HTTP timeouts for the unix socket.

What's the best way to test this MR?

The problem is happening intermittently, so difficult to write a test for.

By default, the docker client doesn't set these timeouts, and we only do because we support remote docker daemons.

For unix and npipe setups, it should be safe to skip these, and hopefully it solves this problem.

What are the relevant issue numbers?

Merge request reports

Loading