Community Note
- Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Tell us about your request
tldr: Keep feature to copy files from mount point into volume on initial creation
https://cloudonaut.io/how-to-dockerize-your-php-application-for-aws-fargate/
I have a task with 2 containers: nginx and php
php contains scripts which is called by nginx through php-fpm fastCGI
nginx serves those php requests but also static files which, for performance reasons, are not served through fpm but are on a shared volume served directly by nginx
In Fargate 1.3.0, mounting an empty volume (without host configuration) in both containers magically shared files from one container with the other container, I understand this may have been a "hack" though
Which service(s) is this request for?
Fargate
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
In Fargate 1.3.0, when mounting a volume in a container, the initial data at the mount point was copied into the new volume (which is as expected according to the Docker documentation: https://docs.docker.com/storage/volumes/#populate-a-volume-using-a-container)
that is not the case in 1.4.0 anymore, the volume is empty
this is a breaking change that prevents one of my nginx-php applications to be migrated to 1.4.0
which is good I discovered this before AWS set the LATEST tag to 1.4.0
Are you currently working around this issue?
Hardcoded platform version 1.3.0 in service definition
still looking for a workaround but hard to debug since I cannot open a console in Fargate tasks
I could also workaround the issue by copying the files from the php image into the nginx image before pushing to ECR, but that, again, is extra work in the CD pipeline
Additional context
I suspect this is a Docker feature which was lost since Fargate 1.4.0 moved to Containerd
this issue is very related in another non-Docker environment:
podman-container-tools/podman#3945
Attachments
Community Note
Tell us about your request
tldr: Keep feature to copy files from mount point into volume on initial creation
https://cloudonaut.io/how-to-dockerize-your-php-application-for-aws-fargate/
I have a task with 2 containers: nginx and php
php contains scripts which is called by nginx through php-fpm fastCGI
nginx serves those php requests but also static files which, for performance reasons, are not served through fpm but are on a shared volume served directly by nginx
In Fargate 1.3.0, mounting an empty volume (without host configuration) in both containers magically shared files from one container with the other container, I understand this may have been a "hack" though
Which service(s) is this request for?
Fargate
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
In Fargate 1.3.0, when mounting a volume in a container, the initial data at the mount point was copied into the new volume (which is as expected according to the Docker documentation: https://docs.docker.com/storage/volumes/#populate-a-volume-using-a-container)
that is not the case in 1.4.0 anymore, the volume is empty
this is a breaking change that prevents one of my nginx-php applications to be migrated to 1.4.0
which is good I discovered this before AWS set the LATEST tag to 1.4.0
Are you currently working around this issue?
Hardcoded platform version 1.3.0 in service definition
still looking for a workaround but hard to debug since I cannot open a console in Fargate tasks
I could also workaround the issue by copying the files from the php image into the nginx image before pushing to ECR, but that, again, is extra work in the CD pipeline
Additional context
I suspect this is a Docker feature which was lost since Fargate 1.4.0 moved to Containerd
this issue is very related in another non-Docker environment:
podman-container-tools/podman#3945
Attachments