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 ?
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