The official postgres image accepts environment variables to create a custom super user with a password and a custom db name.
If you do not wish to provide these variables when running the container what you can do is create an image using the official postgres image as the base, add a bash script which sets the appropriate environment variables and calls entrypoint script docker-entrypoint.sh.
If you wish to add more databases or users, you may want to replace the script entirely with your own (the file is located under /usr/local/bin/ within the container). The following lines would be of interest to you:
"${psql[@]}" --username postgres <<-EOSQL
CREATE DATABASE "$POSTGRES_DB" ;
EOSQL
"${psql[@]}" --username postgres <<-EOSQL
$op USER "$POSTGRES_USER" WITH SUPERUSER $pass ;