Search code examples
javadockerintellij-ideadocker-compose

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.


Solution

  • 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