0
votes

I'm exploring using Docker and Docker Machine to simplify my workflow for spinning up environments in AWS to support data analysis and machine learning tasks. I've worked out most of the details but have two outstanding questions:

1) When launching a VM in AWS with Docker Machine, how do I specify an EBS volume to attach to that VM?

2) How do I map the EBS volume through to a path in the container running on the VM?

Thanks for your assistance!

1

1 Answers

1
votes

I found this writeup to be helpful: https://theholyjava.wordpress.com/2015/06/02/mounting-an-ebs-volume-to-docker-on-aws-elastic-beanstalk/

You can specify volumes to mount in your dockerrun.aws.json file. Make sure to also mount the volume in your dockerfile as well, with something like VOLUME: ["/var/ebs/path"]. That should take care of mounting the sotarge to a path in the container.

BTW this is a cool container for attaching an EBS volume to the instance.