In amazon EC2-instance (Amazon Linux AMI 2015.03.0 x86_64 HVM) I mounted EBS volume to /data directory. Now, I have a docker container that I (sudo) run with -v /data:/data. This container creates some files in /data directory. The problem is that all these files are created in shadowed /data directory and not in EBS /data volume.
How to make docker to write into the mounted EBS volume instead, and why this strange behavior happens?