Can't write to Docker volume
Solution that worked for me in the past: create a new image out of the existing one and let entrypoint script of that new image to modify permissions of your volume_mountpoint.

So in the case of your image (php:7.4-apache) you create entrypoint.sh file, something like

chown www-data:www-data -R /path/to/volume_mountpoint
apache2-foreground


And then your Dockerfile should be something like

FROM php:7.4-apache
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]


This way it should correct the permissions when container starts. Note, that I haven't tested the above, might require some tweaks - but hopefully it shows the idea.

P.s. Maybe somebody has a better way of doing this - I would be very interested myself.