Skip to content

Instantly share code, notes, and snippets.

@abhiyerra
Last active October 5, 2016 01:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhiyerra/eb0062cc2c14cd6d88912924a4cd1289 to your computer and use it in GitHub Desktop.
Save abhiyerra/eb0062cc2c14cd6d88912924a4cd1289 to your computer and use it in GitHub Desktop.
docker-machine and docker-compose
PARKINGSPOT_API_KEY=yourapikey
$(parkingspot -memory 2000 -cpu 6 -max-bid 0.50) docker-machine create --driver amazonec2 \
--amazonec2-request-spot-instance \
--amazonec2-region "${PARKINGSPOT_REGION}" \
--amazonec2-spot-price "${PARKINGSPOT_BID}" \
--amazonec2-instance-type "${PARKINGSPOT_INSTANCE_TYPE}" \
parkingspot-worker
# If you want to use Docker Compose
eval $(docker-machine env parkingspot-worker) && docker-compose build && docker-compose up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment