- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbash.sh
More file actions
Latest commit
executable file
·21 lines (16 loc) · 529 Bytes
/
Copy pathbash.sh
File metadata and controls
executable file
·21 lines (16 loc) · 529 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
if [ -f .env ];then
source .env
fi
:${PG_IMAGE?"need to set image name IMAGE, see README.md"}
:${ROOT=/root}
:${PGUSER=postgres}
:${PGNAME=postgresql}
:${PGDATA=$ROOT/db}
:${PGCONF=$ROOT/conf/postgresql.conf}
:${PGBIN=/usr/local/pgsql/bin}
:${CMD=/bin/bash}
:${PGPORT=5432}
:${SUDO=""}# change to "sudo" if you aren't in docker group
:${OPTIONS="-i -t -w $ROOT -p $PGPORT:5432 -u $PGUSER -v $(pwd):$ROOT -e ROOT=$ROOT -e PGDATA=$PGDATA -e PGNAME=$PGNAME"}
$SUDO docker run $OPTIONS$PG_IMAGE$CMD