Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot connect intelliJ with Docker Machine

I'm having troubles with connecting my docker compose with intelliJ. I am using Docker toolbox. I have the docker-compose.exe file downloaded and in the folder of Docker Toolbox. However, I cannot seem to get everything connected.

When "connecting it gives a "Timeout Exceeded" error

When I go to the "Docker"-tab of the settings, I get the following.

Error in Docker-tab

I am using the "Docker Machine" because on the Docker site it is said to use that.

like image 927
DYD35 Avatar asked May 21 '20 12:05

DYD35


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 you expose a Docker on a TCP socket?

To allow connections to Docker Engine running in a remote operating system, you need to configure docker to listen to TCP 2376 port and allow it to be accessed from the machine that runs the Wazi Proxy Service. Note: For below situations, the exposed port needs to be allowed in the Windows Firewall.

How do I find my Docker Engine API URL?

It depends on your host, but look for /etc/default/docker or /var/lib/boot2docker/profile (for Docker Machine hosts using a boot2docker VM). Then get the IP address of the machine hosting your Docker daemon. (With a Docker Machine created host, that would be: docker-machine ip <yourmachine> .)


1 Answers

Through the highlighted Docker Machine path error, I guess you don't have Docker Machine installed.

You should then switch to TCP Socket connection to connect to docker daemon:

  • IntelliJ IDEA:
    • Remove the Docker Machine path configured under File | Settings | Build, Execution & Deployment | Docker | Tools
    • Enable the TCP Socket under File | Settings | Build, Execution & Deployment | Docker
    • Set the Engine API URL to tcp://localhost:2375 (should be the default if you didn't change it)
  • Docker Desktop:
    • Expose the docker daemon, under Settings | General, enable Expose daemon on tcp://localhost:2375 without TLS option
    • Restart Docker Desktop and you are good to go
like image 89
tmarwen Avatar answered Oct 22 '22 02:10

tmarwen