Overwriting ECS Fargate volumesFrom Mounts

0

Is it possible to overwrite a mount that was created via volumesFrom?

We have an nginx container that imports all of the volumes from a php container using volumeFrom. This process auto-mounts all of the volumes defined in the php container to their same paths within the nginx container. For the nginx container, I would like some of those paths to be readonly mounts. I believe I should be able to specify a new mountPoint with the same sourceVolume and containerPath, but set it to read only.

This is not working, so I would appreciate the help.

soleson
asked 3 years ago476 views
1 Answer
0

I was able to resolve this by not using volumesFrom. I was unaware that the volumes introduced via the VOLUMES instruction within a Dockerfile could be made available to other containers in the same task just by mounting it in the initial container and using the same sourceVolume value in another container. By doing this, it allowed for us to mount some volumes readOnly and/or change the containerPath to any value we needed.

soleson
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions