Can a single EBS be shared across multiple Amazon Docker Containers?

I want to copy some data from S3 to EBS when the FIRST Docker Container spins off. For subsequent spawned Docker Containers, I want to share the data I copied on the EBS. I do not want data to be duplicated for every Docker Container.

Can anyone tell me if a single EBS can be shared across multiple Amazon Docker Containers ?

  • Using pm2 Inside of an Auto-Scaling Environment
  • Elastic Beanstalk Docker with Amazon CloudWatch
  • Docker on RHEL 7 in AWS can’t pull images
  • Passing environment variables to Docker containers
  • Docker Error - “jq: error: Cannot iterate over null”
  • Increasing the AWS ECS Task Definition reserved ports limit
  • Access private docker registry in browser
  • How do I make my Docker container communicate with another node through a 2nd interface?
  • Docker : How To Dockerize And Deploy multiple instances of a LAMP Application
  • Build multiple images from multiple dockerfile
  • docker registry with --insecure-registry and docker 1.5
  • Nginx and uwsgi connection refused when placed in separate docker containers
  • 2 Solutions collect form web for “Can a single EBS be shared across multiple Amazon Docker Containers?”

    Yes, multiple docker containers can share data located on an EBS volume attached to an EC2 instance if they are running on that EC2 instance.

    This is not possible with ECS as several EC2 instances would be involved.

    EBS can only be linked to a single ec2 instance

    • if you have docker containers spinned on single ec2 instance, it will work
    • If you have docker containers spinned on a ec2 cluster with multiple ec2 instances, it will not work; an option in such case would be to use EFS
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.