Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect IntelliJ Docker Integration to Docker Desktop (for Windows 10)

When I'm trying to get the Docker integration of IntelliJ (Ultimate 2018.3.3) working together with local running Docker Desktop (Version 2.0.0.3 (31259)), I'm getting the following error:

Cannot connect: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: localhost:127.0.0.1:2375
caused by: java.net.ConnectException: Connection refused: no further information

I found the following question: IntelliJ cannot connect to protected tcp Docker socket

But this solution leads to this error:

Cannot connect: com.github.dockerjava.api.exception.DockerClientException: Enabled TLS verification (DOCKER_TLS_VERIFY=1) but certificate path (DOCKER_CERT_PATH) is not defined.

I searched for the cert path of Docker Desktop but found nothing yet because the new Hyper-V solution of Docker Desktop doesn't run docker-machine native any more.

like image 966
slinke Avatar asked Mar 28 '19 08:03

slinke


People also ask

How do I connect to Docker in Intellij?

Make sure the Docker plugin is installed and enabled To enable Docker support in IntelliJ IDEA Community Edition or IntelliJ IDEA Edu, install the Docker plugin from the Marketplace. Press Ctrl+Alt+S to open the IDE settings and select Plugins. Find the Docker plugin and make sure it is installed and enabled.

How do I connect to a Docker container in Windows?

To switch to Windows containers in Docker, right-click the Docker icon, and select Switch to Windows containers. To use the command line to switch between containers, run & $Env:ProgramFiles\Docker\Docker\DockerCli.exe -SwitchDaemon .

How do I create a Docker image in Intellij?

In the Project tool window, right-click the project name, point to New and click File. In the New File dialog, type Dockerfile and press Enter . This Dockerfile builds an image based on the openjdk:17 image from Docker Hub.


1 Answers

The solution is to enable exposing the Docker deamon on tcp:localhost:2375 without TLS. This option can be found in general settings of Docker Desktop (Version 2.0.0.3).

like image 129
slinke Avatar answered Sep 17 '22 13:09

slinke