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:

  • Access Docker forwarded port on Mac
  • Do Docker images save the memory state?
  • mounting docker-machine VM folders in container with docker-compose
  • i/o timeout error using progrium/docker-consul
  • Http2 protocol in an nginx reverse proxy and docker container
  • Restricting file access of Docker container
  • 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

  • Why am I not seeing higher concurrent requests when increasing nodes/pods on a simple NGINX docker cluster?
  • Service ports not visible in overlay network across hosts using docker swarm mode
  • Can I run the service on 443 port in docker UCP ??
  • Docker and Volumes nocopy
  • Deploying new versions of an image instantly
  • Confused about multiple different containers using a single data volume containers [closed]
  • 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.