I like to refer host folders as a relative subfolder form the place you install your docker-compose.ymll, but you can make this absolute if you prefer.
This line will make your host folder “./volumes/yourThemeName” reachable inside the OJS container (if not, check paths and be sure your permissions are right).
Please, test it and tell me if something fails.
BTW, notice OJS 2.4 is deprecated so docker images are still there to help in the upgrade process… not ready for production.