Enable Docker Remote API on Docker Machine on Mac OS X

Docker daemon provides a Remote REST API. This API is used by the client to communicate with the engine. This API can be also be invoked by other tools, such as curl or Chrome Postman REST Client.

If you are creating Docker daemons using Docker Machine on OSX Mavericks, then getting this API to work is a bit tricky. This blog will explain how to enable Docker Remote API on Docker Machines created on Mac OS X.

Connecting to the secure Docker port using curl gives the command as:

$ curl https://$HOST:2376/images/json \
  --cert ~/.docker/cert.pem \
  --key ~/.docker/key.pem \
  --cacert ~/.docker/ca.pem

Couple of issues with this command:

Let's fix this!

Read through the complete API and go crazy now!

 

 

 

 

Top