An application writing to storage/logs/app.log inside a container is writing to a layer that disappears with the container, and nothing collects it.
# the image, for anything that insists on a file
RUN ln -sf /dev/stdout /var/log/nginx/access.log
&& ln -sf /dev/stderr /var/log/nginx/error.log
# php-fpm
RUN echo 'catch_workers_output = yes' >> /usr/local/etc/php-fpm.d/zz.conf
&& echo 'decorate_workers_output = no' >> /usr/local/etc/php-fpm.d/zz.conf
decorate_workers_output is the setting that stops php-fpm prefixing every line with its own noise, which otherwise breaks any downstream JSON parsing. Once everything is on stdout, the log driver is a deployment decision rather than an application one, and switching from json-file to something that ships elsewhere touches no code. The one thing to keep in mind is that stdout is not buffered the same way a file is, so an extremely chatty process can block on a slow log driver.