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
demandé il y a 3 ans497 vues
1 réponse
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
répondu il y a 3 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions