Last active
January 7, 2016 08:52
-
-
Save ogavrisevs/1a1e8439fb324ea30fe9 to your computer and use it in GitHub Desktop.
Access Docker API (docker-machine) with curl on Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
docker_machine_name="dev" | |
password="qwerty123" | |
ip=$(docker-machine ip $docker_machine_name) | |
openssl pkcs12 -export -in ~/.docker/machine/machines/$docker_machine_name/server.pem -inkey ~/.docker/machine/machines/$docker_machine_name/server-key.pem -out ~/.docker/machine/machines/$docker_machine_name/cert.pfx -password pass:$password | |
curl --cacert ~/.docker/machine/machines/$docker_machine_name/server.pem --cert ~/.docker/machine/machines/$docker_machine_name/cert.pfx --pass $password https://$ip:2376/version | jq . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment