In order to change the owner of the copied files in the container, it is necessary to add the key "–chown" to the "COPY" command
Example:
COPY --chown=www-data:www-data ./my-site /var/www/html
In order to change the owner of the copied files in the container, it is necessary to add the key "–chown" to the "COPY" command
Example:
COPY --chown=www-data:www-data ./my-site /var/www/html