Why not mount each extension as a volume individually?
services:
...
mediawiki:
...
volumes:
...
- ./extensions/extension1:/var/www/html/extensions/extension1
...
...
...
...
This is how I did it and it works great!