I was running into that issue using this image without any custom Dockerfile.
$ boot2docker version
Client version: v1.1.2
Git commit: 429947b
$ docker version
Client version: 1.1.2
Client API version: 1.13
Go version (client): go1.2.1
Git commit (client): d84a070
Server version: 1.1.2
Server API version: 1.13
Go version (server): go1.2.1
Git commit (server): d84a070
I've managed to fix the issue with the following:
sed -ri "s/^#unix_socket_directories = .*$/unix_socket_directories = '\/tmp'/" "$PGDATA"/postgresql.conf
Though I had to use a custom docker-entrypoint.sh because at build time there is no postgresql.conf file.