Docker Community Forums

Share and learn in the Docker community.

Accessing Docker Daemon on port 2375

beta

(Qtzar) #1

Is it possible to allow application on the Mac access to Docker on port 2365?

I am trying to use Eclipse with a maven build tool ( com.spotify:docker-maven-plugin ) that attempts to access http://localhost:2375 to deploy the container but it is failing as nothing islistening on that port.


How to configure Docker for Mac beta daemon to listen on tcp
(Qtzar) #2

I found a solution, I need a DOCKER_HOST set as unix:///var/run/docker.sock

To get this active for windows applications on the mac I needed to create a ~/Library/LaunchAgents/environment.plist file with the following config

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>my.startup</string>
  <key>ProgramArguments</key>
  <array>
    <string>sh</string>
    <string>-c</string>
    <string>
    launchctl setenv DOCKER_HOST unix:///var/run/docker.sock
    </string>
  </array>
  <key>RunAtLoad</key>
  <true/>
</dict>
</plist>

Then after a reboot of the mac the setting is available for all applications including Eclipse and the docker-maven-plugin