From 13fc0223b096fc36f384ea3d0e09dc7c4cc8ec71 Mon Sep 17 00:00:00 2001 From: Arif Herusetyo Wicaksono Date: Sat, 19 Jan 2019 15:45:36 +0900 Subject: [PATCH] Replace static version in postgres with variable --- postgres.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/postgres.md b/postgres.md index 80ab6c8..70f17ea 100644 --- a/postgres.md +++ b/postgres.md @@ -6,7 +6,8 @@ This quick start deployment utilizes Alpine-based image. ```bash # pull the image from docker hub -docker pull postgresql:10-alpine +VERSION= +docker pull postgresql:"$VERSION" # define environment variables cat << EOF > POSTGRESENV @@ -19,11 +20,11 @@ EOF PGSRV= PGSRVPORT= -docker run -d --name ${PGSRV} --env-file POSTGRESENV -p ${PGSRVPORT}:5432 postgres:10-alpine +docker run -d --name "${PGSRV}" --env-file POSTGRESENV -p "${PGSRVPORT}":5432 postgres:"$VERSION" # specify container name for psql configuration, if needed PGCLI= -docker run -d --name ${PGCLI} postgres:10-alpine +docker run -d --name "${PGCLI}" postgres:"$VERSION" # connect using client container, enter password when prompted PGUSER=