
babim/postgresql(thanks: onjin)
console$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d babim/postgresql:alpine
This image includes EXPOSE 5432 (the postgres port), so standard container linking will make it automatically available to the linked containers. The default postgres user and database are created in the entrypoint with initdb.
The postgres database is a default database meant for use by users, utilities and third party applications.
postgresql.org/docs
console$ docker run --name some-app --link some-postgres:postgres -d application-that-uses-postgres
psqlconsole$ docker run -it --link some-postgres:postgres --rm babim/postgresql:alpine sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres'
The PostgreSQL image uses several environment variables which are easy to miss. While none of the variables are required, they may significantly aid you in using the image.
DB_PASSThis environment variable is recommended for you to use the PostgreSQL image. This environment variable sets the superuser password for PostgreSQL. The default superuser is defined by the DB_USER environment variable. In the above example, it is being set to "mysecretpassword".
DB_USERThis optional environment variable is used in conjunction with DB_PASS to set a user and its password. This variable will create the specified user with superuser power and a database with the same name. If it is not specified, then the default user of postgres will be used.
PGDATAThis optional environment variable can be used to define another location - like a subdirectory - for the database files. The default is /var/lib/postgresql, but if the data volume you're using is a fs mountpoint (like with GCE persistent disks), Postgres initdb recommends a subdirectory (for example /var/lib/postgresql/pgdata ) be created to contain the data.
DB_NAMEThis optional environment variable can be used to define a different name for the default database that is created when the image is first started. If it is not specified, then the value of DB_USER will be used.
LANGThis optional environment variable can be used to define a different locale for created cluster. The default is en_US.UTF-8.

manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务