How to enable docker remote api in mac OS X?

I’m new to docker, and I want to use java api to print my docker information. I read this tutorial.I use boot2docker and print this command “boot2docker ip” to find my docker machine ip is

bash-3.2$ boot2docker ip

So,I use rest to connect docker.I input
and it can connect to it,but show nothing.So I guess it maybe I should make my docker enable rest. How should I do for it? I’m also new to mac OS X. please give more detail for me. Thanks

I use command:

  • Can't build ASP.NET Core app that references PCL in docker
  • Restarting docker engine and keeping containers running
  • Can't set docker-machine environment variables bash
  • Problems setting up artifactory as a docker registry
  • Docker running nginx plus jar
  • Jenkins trigger on-demand slaves in dockers
  • curl -v

    it show information :

    * Hostname was NOT found in DNS cache
    *   Trying
    * Connected to ( port 2376 (#0)
    > GET /info HTTP/1.1
    > User-Agent: curl/7.37.1
    > Host:
    > Accept: */*
    * Connection #0 to host left intact

  • How to deliver docker image to client?
  • Docker: how do I find localhost's password on Windows 8.1
  • docker process not running in background
  • pip cannot install websocket-server python packge
  • Docker swarm over IPv6
  • How to get docker run to take the directory from the client machine to the host container?
  • One Solution collect form web for “How to enable docker remote api in mac OS X?”

    As mentioned in “Enabling Remote API in Docker on Mac OS X (boot2docker)”, boot2docker supports remote access on port 2375 (non-TLS, instead of 2376 TLS), so try:

    More generally, follow Boot2Docker on Mac, for example “from your command line”

    boot2docker init
    boot2docker start
    boot2docker shellinit
    eval "$(boot2docker shellinit)"
    docker run hello-world
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.