alanh
By:
alanh

I'm unable to create a docker machine using the access token generated by my DigitalOcean account

August 16, 2016 706 views
Docker API DigitalOcean Ubuntu 16.04

This is the error that I get:

$ docker-machine create --driver digitalocean --digitalocean-access-token=<my_token> flask
Running pre-create checks...
Creating machine...
(flask) Creating SSH key...
(flask) Creating Digital Ocean droplet...
Error creating machine: Error in driver during machine creation: POST https://api.digitalocean.com/v2/droplets: 422 You specified an invalid image for Droplet creation.
1 Answer

Try adding --digitalocean-image docker to your docker-machine command. The error being displayed is because the DigitalOcean API is not being sent a proper image ID or slug to know which disk image to use when creating your droplet.

Have another answer? Share your knowledge.