From 6ba40c0c0696262676a778be2f99b1c0a78b7904 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 18 May 2016 16:24:46 -0700 Subject: [PATCH] Ditch psql "POSTGRES_PORT_*" environment variables --- postgres/content.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/postgres/content.md b/postgres/content.md index bc586bdb6..ad0c96d8f 100644 --- a/postgres/content.md +++ b/postgres/content.md @@ -30,7 +30,16 @@ $ docker run --name some-app --link some-postgres:postgres -d application-that-u ## ... or via `psql` ```console -$ docker run -it --link some-postgres:postgres --rm postgres sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres' +$ docker run -it --rm --link some-postgres:postgres postgres psql -h postgres -U postgres +psql (9.5.0) +Type "help" for help. + +postgres=# SELECT 1; + ?column? +---------- + 1 +(1 row) + ``` ## Environment Variables