From 4194a0c319ce5f8ae96e58e13a9da1988158caf6 Mon Sep 17 00:00:00 2001 From: Joram van den Boezem Date: Thu, 13 Aug 2020 20:53:23 +0200 Subject: [PATCH] chore: fix postgres cmd --- postgres/Dockerfile.windows | 2 +- test.sh | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/postgres/Dockerfile.windows b/postgres/Dockerfile.windows index a4d992f..368f6f6 100644 --- a/postgres/Dockerfile.windows +++ b/postgres/Dockerfile.windows @@ -33,4 +33,4 @@ RUN mkdir "C:/pgsql/data" RUN mkdir "C:/pgsql/log" RUN pg_ctl -D "C:/pgsql/data" init -CMD ["C:/pgsql/bin/pg_ctl.exe", "-D", "C:/pgsql/data", "-l", "C:/pgsql/log/pgsql.log", "start"] +CMD ["C:/pgsql/bin/postgres.exe", "-D", "C:/pgsql/data"] diff --git a/test.sh b/test.sh index efe5747..f7bacf8 100644 --- a/test.sh +++ b/test.sh @@ -30,7 +30,7 @@ function retry { } function get_health_status { - docker inspect --format="{{json .State.Health.Status}}" $IMAGE + docker inspect --format="{{json .State.Health.Status}}" test } function check_if_healthy { @@ -43,16 +43,16 @@ function check_if_healthy { set -e -echo "Running Docker image $IMAGE:$TAG in a container named $IMAGE" +echo "Running Docker image exivity/$IMAGE:$LATEST_TAG in a container named test" docker run \ --rm \ --detach \ - --name $IMAGE \ + --name test \ exivity/$IMAGE:$LATEST_TAG echo "Running health check" # retry 6 means we will wait max 1+2+4+8+16 seconds -retry 6 check_if_healthy || (docker inspect $IMAGE && exit 1) +retry 6 check_if_healthy || (docker inspect test && exit 1) -echo "Stop Docker container $IMAGE" -docker stop $IMAGE +echo "Stop Docker container test" +docker stop test