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

Posted August 16, 2016 2.6k views
DigitalOceanAPIDockerUbuntu 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 422 You specified an invalid image for Droplet creation.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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.