ecs mounts volumes as bind
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
my userdata
```
echo "XXX.efs.eu-west-1.amazonaws.com:/ /var/lib/docker/volumes nfs4 vers=4.1,defaults 0 0" >> /etc/fstab
mount -a && docker volume create --label OVPN_DATA OVPN_DATA
```
my task definition
```
volume {
name = "OVPN_DATA"
}
```
```
"mountPoints": [
{
"containerPath": "/etc/openvpn",
"sourceVolume": "OVPN_DATA"
}
```
if I run from the EC2 host
`docker run -v OVPN_DATA:/etc/openvpn -d -p 443:1194/tcp --cap-add=NET_ADMIN kylemanna/openvpn`
docker inspect shows
```
"Mounts": [
{
"Type": "volume",
"Name": "OVPN_DATA",
"Source": "/var/lib/docker/volumes/OVPN_DATA/_data",
"Destination": "/etc/openvpn",
"Driver": "local",
"Mode": "z",
"RW": true,
"Propagation": ""
}
],
```
but when running from ECS
```
"Mounts": [
{
"Type": "bind",
"Source": "/var/lib/docker/volumes/OVPN_DATA/_data",
"Destination": "/etc/openvpn",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
],
```
it mounts the volume as BIND
Documentation https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html doesnt really help here
Contributor guide
Assessment
This issue has not been assessed yet.