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
|
```bash
|
||||||
# pull the image from docker hub
|
# pull the image from docker hub
|
||||||
docker pull postgresql:10-alpine
|
VERSION=
|
||||||
|
docker pull postgresql:"$VERSION"
|
||||||
|
|
||||||
# define environment variables
|
# define environment variables
|
||||||
cat << EOF > POSTGRESENV
|
cat << EOF > POSTGRESENV
|
||||||
@ -19,11 +20,11 @@ EOF
|
|||||||
PGSRV=
|
PGSRV=
|
||||||
PGSRVPORT=
|
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
|
# specify container name for psql configuration, if needed
|
||||||
PGCLI=
|
PGCLI=
|
||||||
docker run -d --name ${PGCLI} postgres:10-alpine
|
docker run -d --name "${PGCLI}" postgres:"$VERSION"
|
||||||
|
|
||||||
# connect using client container, enter password when prompted
|
# connect using client container, enter password when prompted
|
||||||
PGUSER=
|
PGUSER=
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user