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
gefragt vor 3 Jahren495 Aufrufe
1 Antwort
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
beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen