From e4865c8d169a0e2b548370740906b028bce8892c Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 11 Sep 2023 15:25:00 +0200 Subject: [PATCH 1/2] OP-1538: update dockerfile --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6e2eafe..6934eef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,14 @@ -FROM postgres:13-alpine +FROM postgres:13-alpine as base # Script to detect whether the database has finished initializing COPY ["true_isready.sh", "/usr/local/bin/"] -COPY ["database scripts/00_dump.sql", "database scripts/0[2345]_*.sql", "database scripts/demo_db.sql", "database scripts/json_schema_extension.sql", "/docker-entrypoint-initdb.d/"] +COPY ["database scripts/00_dump.sql", "database scripts/0[2345]_*.sql", "database scripts/json_schema_extension.sql", "/docker-entrypoint-initdb.d/"] # Install https://github.com/gavinwahl/postgres-json-schema/ # extension that allows validation of jsonb fields against jsonschema COPY ["install_postgres_json_schema_extension.sh", "install_postgres_json_schema_extension.sh"] RUN chmod u+x install_postgres_json_schema_extension.sh RUN ./install_postgres_json_schema_extension.sh + +FROM base as demo +COPY ["database scripts/demo_db.sql", "/docker-entrypoint-initdb.d/"] From b17246f4962ffc3976d7d033c8e8940ac6a803c0 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 11 Sep 2023 15:32:37 +0200 Subject: [PATCH 2/2] OP-1538: change as to upper case --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6934eef..6e72e74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM postgres:13-alpine as base +FROM postgres:13-alpine AS base # Script to detect whether the database has finished initializing COPY ["true_isready.sh", "/usr/local/bin/"] @@ -10,5 +10,5 @@ COPY ["install_postgres_json_schema_extension.sh", "install_postgres_json_schema RUN chmod u+x install_postgres_json_schema_extension.sh RUN ./install_postgres_json_schema_extension.sh -FROM base as demo +FROM base AS demo COPY ["database scripts/demo_db.sql", "/docker-entrypoint-initdb.d/"]