Best practise in fixing bugs in third party image

I’m working on a project which has a docker compose file and a docker file. The docker file pulls in an image from another project, a PHP application, and I believe there’s a bug in that project.

What I’ve been struggling to find an answer for is, how do I create a fork of that image code and submit a bug fix to github?

I could possibly fork the third party image from github and see if I can fix the issue there, but it wouldn’t include the code my project builds upon, so I can’t test it with my project directly.

I can see you can mount a volume locally so you can edit the code in a editor, but that includes the git file for my project and not the third party git.

What is the best practise in fixing issues around code in a third party docker images while working around your own code and creating a fork and pull request for that third party PHP application?

There doesn’t seem to be any posts anywhere which cover this. Thanks