I have a system running several docker containers with httpd, mariadb and redis. The httpd containers are running with names like ‘site1tld_httpd_1’.
Each httpd container writes the access_log and error_log to a host volume in /srv/volumes/<vhost>/httpd/logs . Just easy to have them accessible.

For these containers, I needed to run logrotate to keep those files from getting too large. Of course, these docker containers just run httpd as pid 1 and do not have logrotate installed.
The solution for me was to have logrotate on the host rotate every log, and then reload every docker container running httpd. A httpd reload is just done by sending a kill signal 1 to the httpd process.

This is done as follows ( a file in /etc/logrotate.d ):

/srv/volumes/*/httpd/logs/*log {
  daily
  rotate 7
  create
  compress
  delaycompress
  nodateext
  sharedscripts
  postrotate
    docker ps -f name=httpd -q | xargs docker kill -s 1 >/dev/null 2>&1
  endscript 
}

So the postrotate section is simple but effective: give me the ids of docker containers with “httpd” in the name and feed those ids to docker kill and use signal 1 to notify each process.