From 4decf5c8513b63e62c96f3335a9b56913e6d79ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sun, 9 May 2021 16:58:17 +0300 Subject: [PATCH] support in-container make --- IV/db | 5 +++-- IV/in-container | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/IV/db b/IV/db index fc596a2..f01321a 100755 --- a/IV/db +++ b/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) diff --git a/IV/in-container b/IV/in-container index 7a06ef5..edeb8e8 100755 --- a/IV/in-container +++ b/IV/in-container @@ -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 \