Is there any more to the error message? This post suggests the file it is looking for is the PID file.
What you could do is to add a custom command line for this image, I think the key is command. Using that you can launch the server in a custom way. Perhaps it is trying to use a socket, and needs to use a TCP port instead?
Alternatively, if you are not wedded to using a secondary container for your database, you could see this post on installing the database server in the primary/build container.
I ran into the same issue and was able to come up with a solution. It looks like by default postgresql-client will try to connect to a socket rather than an IP address.
By specifying -h localhost I was able to run commands against a secondary postgres container.
So in your example, something like this should work:
This assumes that user exists as a role on the database that is able to create new schemas. You can configure this as an environment argument on your postgresql container.