Remove quotes from docker environment variables
This commit is contained in:
parent
5a97ebcbe3
commit
58dbe06006
20
postgres.md
20
postgres.md
@ -10,25 +10,25 @@ docker pull postgresql:10-alpine
|
||||
|
||||
# define environment variables
|
||||
cat << EOF > POSTGRESENV
|
||||
POSTGRES_USER=""
|
||||
POSTGRES_PASSWORD=""
|
||||
POSTGRES_DB=""
|
||||
POSTGRES_USER=
|
||||
POSTGRES_PASSWORD=
|
||||
POSTGRES_DB=
|
||||
EOF
|
||||
|
||||
# define container name and ports
|
||||
PGSRV=""
|
||||
PGSRVPORT=""
|
||||
PGSRV=
|
||||
PGSRVPORT=
|
||||
|
||||
docker run -d --name ${PGSRV} --env-file POSTGRESENV -p ${PGSRVPORT}:5432 postgres:10-alpine
|
||||
|
||||
# specify container name for psql configuration, if needed
|
||||
PGCLI=""
|
||||
PGCLI=
|
||||
docker run -d --name ${PGCLI} postgres:10-alpine
|
||||
|
||||
# connect using client container, enter password when prompted
|
||||
PGUSER=""
|
||||
PGDB=""
|
||||
PGHOST=""
|
||||
PGPORT=""
|
||||
PGUSER=
|
||||
PGDB=
|
||||
PGHOST=
|
||||
PGPORT=
|
||||
docker exec -it ${PGCLI} psql -h ${PGHOST} -p ${PGPORT} -U ${PGUSER} -W -d ${PGDB}
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user