support in-container make

This commit is contained in:
Motiejus Jakštys 2021-05-19 22:57:50 +03:00 committed by Motiejus Jakštys
parent c1b2134575
commit 872d954a0b
2 changed files with 5 additions and 3 deletions

5
db
View File

@ -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)

View File

@ -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 \