Replace static version in postgres with variable
This commit is contained in:
parent
041e4c6ebc
commit
13fc0223b0
@ -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=
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user