Looks like this is no more required with spotify plugin 0.4.13. I recently switch from docker toolbox to docker for mac and I was running a very old version of spotify plugin. Upgrading to 0.4.13 was enough to solve the issue, no need to define DOCKER_HOST variable.
I am facing same issue in WIndows, how to set DOCKER_HOST?
IS this a env variable
@jinnabalu
Which version of spotify plugin are you using? Upgrade to 0.4.13 if you are using older version. For me upgrading to this version was enough to solve the issue.
I also have the same problem , i use
Windows 10 and Docker for Windows and no Machines.
When i build from maven i included the spotify plugin version 0.4.13 But still it is not resolved
Connect to localhost:2375
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build
Caused by: com.spotify.docker.client.exceptions.DockerException: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
I went into settings for docker and turned on “Expose daemon to tcp://localhost:2375 without TLS” and it started working.
This also worked for me: “Expose daemon to tcp://localhost:2375 without TLS”
export DOCKET_HOST=unix:///private/var/tmp/docker.sock which file should it be set
I ran into same issue in windows 10 env. I went to: “Expose daemon to tcp://localhost:2375 without TLS”; switched it off and back on couple of time and the error went away.
Go to your notification tab, right click the Whale Icon and then click Settings.
In the first page in the very end you will have “Expose daemon tcp://localhost:2375 without TLS” check this box
Thanks gowrav27, this saved my bacon. This also works on the new replacement plugin named “dockerfile-maven-plugin”, same problem and solution.
Hi Gowrav,
Please can you advise, how to do it through docker
tools for windows?
Thanks
Devd
I Havent used the docker tool, I have to play around in it, let me know if this helps Are you trying to connect to a TLS-enabled daemon without TLS?
If not reply back, I will see what I can do
Thanks, it works for me!
I’m having the same issue, on Docker Community Edition Version 17.12.0-ce-mac55 (23011).
I want to use @gowrav27 's solution, but when I right click the whale icon in the top menu bar, I see “Preferences” not “Settings”. In “Preferences” I don’t see “Expose daemon tcp://localhost:2375 without TLS”.
Any suggestions/?
I usually try a few things. If you’re using a very old version that needs Kitematic, fire that up.
I also restart my docker machine and for belt and braces also restart the vm on virtualbox
If you’re on the command line, try typing “docker-machine env” to configure your shell
Thank you folks! My Docker Toolbox VM on Win 10 had gotten in a bad state, I think. I just went to Oracle VM VirtualBox, reset the VM, and everything worked!
How to do that on Windows 7 ? I know that you can directly tune on this option on the Docker GUI but on Windows7 you only have docker toolbox thanks
Follow following steps for window 10
Step 1: Right click on "Dcoker Desktop is running icon "
Step 2: click on Settings
Step 3: In “General Tab” you must enable checkbox “Expose Demon on tcp://localhost:2375 without TLS”
Reference screen attach
i am also getting the same exception .
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:1.0.0:build (default) on project Bookstore: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
I have also set the DOCKER_HOST environment variable but still getting the issue while maven build.
DOCKER_HOST=unix:///var/run/docker.sock
I am using xubuntu 18.04 , may someone help me with this ?
you saved my day, thanks a lot