Skip to content

Instantly share code, notes, and snippets.

@lalyos
Last active March 15, 2018 22:03
Show Gist options
  • Save lalyos/5b496e09adf0aad136ff308594232326 to your computer and use it in GitHub Desktop.
Save lalyos/5b496e09adf0aad136ff308594232326 to your computer and use it in GitHub Desktop.
play with docker API pwd

save session id

export SESSION=balei8na02jg00e4suhg

create instance:

curl https://labs.play-with-docker.com/sessions/$SESSION/instances -X POST

list session info:

curl -s https://labs.play-with-docker.com/sessions/$SESSION|jq .

print ssh commands for each instance

curl -s https://labs.play-with-docker.com/sessions/$SESSION \
  |jq '"ssh \(.instances[].proxy_host)@direct.labs.play-with-docker.com"'

See other API references:

github.com/pwd/pwd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment