There seems to be a bug in the latest docker images. Specifically it seems to be introduced by commit 3706d4c. See here: if (id -u) == 0, postgres is executed without first importing the scripts from /docker-entrypoint-initdb.d. This breaks existing Dockerfiles.