Error using local build with terraform docker image

I have a local google provider build and also installed Terraform on WSL2. The .terraformrc points to the location of the binaries ($GOPATH/bin/providers) terraform configured to use a custom endpoint for the google pubsub emulator. This config works without any issue.

Although when I try to do the same with terraform image in a docker container it gives me this error:

The binaries are located in the image under the /root folder. The symlink created during terraform init points to the correct location of the binaries. Permissions are granted.

Terraform says it has been successfully initialized, but then fails with no such file or directory message.

May I ask if someone can point me to the right direction what am I missing from the configuration to use the local build in dockerized terraform other then a local install?

Many thanks,