Docker-maven-plugin Build Mirror Error: failed: Connection refused: connect
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.7:build (default) on project security-api: Could not build image: java.util.concurrent.ExecutionException: com.spotify.docker.client.sha ded.javax.ws.rs.ProcessingException: com.spotify.docker.client.shaded.org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connect ion refused: connect -> [Help 1]
Solution:
- Go to docker settings (Second mouse click on docker icon, click settings)
- Click on checkbox ‘Expose daemon on tcp://localhost:2375 without TLS’
- Apply & Restart
- Run again: mvn clean install