Either document it that people must manually do docker exec pkc_mediawiki_1 php /var/www/html/maintenance/update.php after their first docker-compose up -d, or somehow specify the script execution in docker-compose.yml.
Relevant issue: docker/compose#1809 (which is a duplicate of many issues).
I think for now it is better to just document the step.