Docker Community Forums

Share and learn in the Docker community.

Mounting AWS EBS volume when launching VM with Docker Machine


(Cpdiehl) #1

Hi All,

At The Data Guild, we’re exploring using Docker and Docker Machine to simplify our workflow in spinning up environments in AWS to support data analysis and machine learning task. 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!

Chris


(Fmontada) #2

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

I want to run a mongo container and I need to point the data/db to the ebs. In order do not lose my data after stop the ec2

docker run -v mnt/data/db:data/db mongo

can someone help us ?

thanks