Expected behavior
I can’t access PostgreSQL server provided by postgres/9.5/Dockerfile at 8e867c8ba0fc8fd347e43ae53ddeba8e67242a53 · docker-library/postgres · GitHub on localhost with psql -h localhost -U postgres
Actual behavior
psql cannot connect
Information
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.1-beta11
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160516-230733.tar.gz
Most specific failure is: No error was detected
Your unique id is: B101AB89-A336-4B86-BB65-CA0E356D2CC0
Please quote this in all correspondence.
Steps to reproduce the behavior
- create docker-compose.yml with following contents:
version: '2'
services:
postgresql:
image: 'postgres:9.5'
ports:
- '5432:5432'
volumes:
- './pg_data:/var/lib/postgresql/data'
env_file: './pg.env'
- create pg.env in the same folder with
POSTGRES_PASSWORD=postgres
- run
docker-compose up
- try to connect