Docker Community Forums

Share and learn in the Docker community.

How do I attach different volume to instance via Docker Machine API?

Expected behavior

Created EC2 instance with “io1” type volume (100GB)

Actual behavior

Throws error saying additional iops argument is missing.

Additional Information

How developers attach different (besides “gp2”) volume to EC2 instance using Docker Machine API ? Given that they also use Docker Machine with docker compose to create containers ?

The docs say developer can use --volume-type "io1" but if you can’t supply the additional required argument iops that makes the flag little bit useless.

How developers go about this ?

Steps to reproduce the behavior

  1. Install Docker Machine for Linux
  2. run docker-machine create -d amazonec2 --volume-type "io1" [instance_name]