Cannot connect to local or remote Docker

Updated at:

You might be unable to connect to Docker on a remote machine or locally on Windows.

Symptoms

In Settings, on the Alibaba Cloud Toolkit > Docker > Docker page, a Docker Connection Test error message is displayed after you click Test Connection.

The error message Connection refused: connect indicates a failed connection to 127.0.0.1:2375. This is because the Docker Daemon is not exposed on TCP port 2375.

Causes

By default, the Docker Daemon does not expose TCP port 2375.

Solutions

  1. In Docker, go to Settings, click General in the left navigation pane, and select the Expose daemon on tcp://localhost:2375 without TLS checkbox.
  2. Restart the Docker Daemon.