From cfcce8373e54608cc8533230516ef34bd5d23aae Mon Sep 17 00:00:00 2001 From: Andy Freeland Date: Mon, 4 Nov 2024 15:11:34 -0800 Subject: [PATCH] Include HypoPG in the Docker image https://github.com/HypoPG/hypopg https://docs.aws.amazon.com/AmazonRDS/latest/PostgreSQLReleaseNotes/postgresql-extensions.html#postgresql-extensions-15x --- .github/workflows/ci.yaml | 4 +++- Dockerfile | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7f1a390..d0c4088 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,6 +4,7 @@ name: Build and publish Docker image env: POSTGRES_VERSION: "15.7" + HYPOPG_VERSION: "1.4.0" PGVECTOR_VERSION: "0.6.0" on: @@ -37,7 +38,8 @@ jobs: context: . build-args: | POSTGRES_VERSION=${{env.POSTGRES_VERSION}} + HYPOPG_VERSION=${{env.HYPOPG_VERSION}} PGVECTOR_VERSION=${{env.PGVECTOR_VERSION}} platforms: linux/amd64,linux/arm64 - tags: ghcr.io/zapgram/pilot-postgres:${{env.POSTGRES_VERSION}}-pgvector${{env.PGVECTOR_VERSION}} + tags: ghcr.io/zapgram/pilot-postgres:${{env.POSTGRES_VERSION}}-hypopg${{env.HYPOPG_VERSION}}-pgvector${{env.PGVECTOR_VERSION}} push: ${{ github.ref_name == 'trunk' }} diff --git a/Dockerfile b/Dockerfile index c3da162..85e883c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,16 @@ FROM postgres:${POSTGRES_VERSION}-alpine RUN apk add --no-cache \ git make gcc clang15 llvm15 musl-dev +ARG HYPOPG_VERSION + +RUN cd /tmp \ + && git clone --branch ${HYPOPG_VERSION} https://github.com/HypoPG/hypopg.git \ + && cd hypopg \ + && make \ + && make install \ + && cd /tmp \ + && rm -rf /tmp/hypopg + ARG PGVECTOR_VERSION RUN cd /tmp \