
xcgd/postgresql`10.0`, `latest`
`9.6`
`9.5`
`9.4`
`9.3`
This docker uses a custom ubuntu:trusty image as a base.
Run your docker, assuming you named your postgresql docker pg as we did above:
$ docker run --rm --name="pg" xcgd/postgresql
To run a specific version:
$ docker run --rm --name="pg95" xcgd/postgresql:9.5
This image ships data volumes for persistence. By default, they will be bound to docker vfs and thus removed along with the container.
You'd rather want to bind volumes to your local file system. This image comes with a facility where initdb is executed only if an empty data volume is found. Otherwise it is just mounted and used.
Let's pretend your persistent data is located under /opt/instance1/dbdata/ on your host machine, you can use it with:
$ docker run --name="pg" -v /opt/instance1/dbdata:/var/lib/postgresql -d xcgd/postgresql
You'll note that we did not open ports to the outside world on the PostgreSQL container. This is for security reasons, NEVER RUN your PostgreSQL container with ports open to the outside world... Just link other containers (single host) or use an ambassador pattern (cluster).
This is really important to understand. PostgreSQL is configured to trust everyone so better keep it firewalled. And before yelling madness please *** this: If someone gains access to your host and is able to launch a container and open a port for himself he's got your data anyway... he’s on your machine. So keep that port closed and secure your host. Your database is as safe as your host is, no more.

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