docker remote API:

a) connect to your EC2 host machine:

ssh ubuntu@54.76.23.44

b) Ubuntu server? Update config /etc/defaults/docker (or /etc/init/docker.conf)

DOCKER_OPTS="-H unix:///var/run/docker.sock -H tcp://127.0.0.1:2375"

c) restart docker

service docker restart

or:

sudo /etc/init.d/docker restart

e) profit:

http://54.76.23.44:2375/images/json

curl -S http://54.76.23.44:2375/version

curl --insecure --cert ~/.docker/machine/certs/cert.pem --key ~/.docker/machine/certs/key.pem https://192.168.99.100:2376/images/json

openssl pkcs12 -export -inkey $DOCKER_CERT_PATH/key.pem -in $DOCKER_CERT_PATH/cert.pem -name test-curl-client-side -out test-curl.p12 -password pass:something curl -k --cert test-curl.p12:something https://$(docker-machine ip dev):2376/info