This repo builds a docker image that accepts the same env vars as the official postgres build but with a much smaller footprint. It achieves that by basing itself off the great alpine docker image by GliderLabs.
$ docker images
REPOSITORY TAG VIRTUAL SIZE
alpine-postgres latest 27.7 MB
postgres latest 213.9 MB
$ make build