It might be better to use a different one such as adminer as it can support multiple DB types
https://www.adminer.org/en/phpmyadmin/
This is my working example - simply add this at the end of docker-compose.yml:
https://gist.github.com/partenit/92f820fe8c55a48d91533988183eb523
How to use: navigate to http://your_host:8080
For login use login "root" and your root password for database.
More params see here:
https://hub.docker.com/r/phpmyadmin/phpmyadmin/
I'm using this same phpmyadmin/phpmyadmin image, I think it is overkill to install one more php5 just for this, maybe it is better to reuse php from workspace with FROM in separate Dockerfile, instead image.
Most helpful comment
It might be better to use a different one such as adminer as it can support multiple DB types
https://www.adminer.org/en/phpmyadmin/