I’m trying to run Docker inside Docker. I’m running the first container on AWS ECS, with task definition that contain “volumes” and "mountPoints" as described below, with CentOS 7 image.
"mountPoints": [
{
"readOnly": null,
"containerPath": "/usr/share/rec/screenrecordings",
"sourceVolume": "recording"
}
],
"volumes": [
{
"name": "recording",
"host": {
"sourcePath": "/recording"
}
}
]
When this container is up, I’m installing “docker-ce” and then runs new container inside of it, trying to upload “kurento-media-server“ Ubuntu 14.4 image (https://hub.docker.com/r/kurento/kurento-media-server/ ).
Inside the Docker runs the command:
“docker run -h my-app --name my-app -d <ECR repo end point>/image:latest --privileged -v /usr/share/rec/myApp:/usr/share/myApp --rm=true”
The docker exited right away with code 0, no errors on docker log.
Running with --mount :
“docker run -h my-app --name my-app -d <ECR repo end point>/image:latest --privileged --mount type=bind,source=/usr/share/rec/myApp ,target=/usr/share/myApp --rm=true”
The container is running but the mount is not established (when running “docker inspect” the “Mount” section is empty, when getting inside the docker –the mounted directory is not exist).
The path on the host "/usr/share/rec/myApp" exist as weel as the container path "/usr/share/".
Docker version: Docker version 17.09.0-ce, build afdb6d4
I really would appreciate any help and insight on how to get this to work.
Thank you in advance.