support in-container make
This commit is contained in:
parent
c1196dc45b
commit
4decf5c851
5
IV/db
5
IV/db
@ -30,13 +30,14 @@ case ${1:-} in
|
||||
start)
|
||||
_psql -qc '\q' 2>/dev/null && exit 0
|
||||
docker run -d --rm \
|
||||
-p 127.0.0.1:5432:5432 \
|
||||
--net=host \
|
||||
-e POSTGRES_DBNAME=osm \
|
||||
-e POSTGRES_USER=osm \
|
||||
-e POSTGRES_PASSWORD=osm \
|
||||
--name "$name" \
|
||||
postgis/postgis:13-3.1-alpine \
|
||||
-c log_statement=all
|
||||
-c log_statement=all \
|
||||
-c listen_addresses=127.0.0.1
|
||||
_wait_for_postgres
|
||||
;;
|
||||
stop)
|
||||
|
@ -7,7 +7,8 @@ if [[ -z "$(docker images -q --filter "reference=$NAME")" ]]; then
|
||||
docker build -t "$NAME" - < Dockerfile
|
||||
fi
|
||||
|
||||
exec docker run --rm \
|
||||
exec docker run -ti --rm \
|
||||
--net=host \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v ${PWD}:/x \
|
||||
-w /x \
|
||||
|
Loading…
Reference in New Issue
Block a user