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