IntelliJ cannot connect to protected tcp Docker so

2019-08-30 00:35发布

问题:

I want to use the Docker integration in IntelliJ to connect to a protected remote Docker socket:

As you can see in the above picture I'm getting the following error:

Cannot connect: java.io.IOException: Channel disconnected before any data was received

When I set the Docker environment variables DOCKER_TLS_VERIFY=1, DOCKER_HOST=tcp://myhost:2376, DOCKER_CERT_PATH=/path/to/certs/ to the same values as in the IntelliJ configuration and try to connect via terminal its working perfectly.

Does anyone know what's causing this error and how I can fix it?

回答1:

The solution was like Kootli suggested in the comments to use https instead of tcp as protocol.

Engine API URL: https://myhost:2376