我正在玩Docker,我想Dockerize一个Postgres容器.
我正在关注官方示例,但我无法连接到使用psql运行的映像.
我用示例的内容创建了Dockerfile.我从Dockerfile构建了一个图像并为其指定了一个名称.然后我运行PostgreSQL服务器容器(在前台).
~/test » docker run --rm -P --name pg_test eg_postgresql
2014-10-10 06:12:43 UTC LOG: database system was interrupted; last known up at 2014-10-10 06:12:29 UTC
2014-10-10 06:12:43 UTC LOG: database system was not properly shut down; automatic recovery in progress
2014-10-10 06:12:43 UTC LOG: redo starts at 0/1782F68
2014-10-10 06:12:43 UTC LOG: record with zero length at 0/1782FA8
2014-10-10 06:12:43 UTC LOG: redo done at 0/1782F68
2014-10-10 06:12:43 UTC LOG: last completed transaction was at log …
Run Code Online (Sandbox Code Playgroud)