From bdf69070e531b3f423a7359a720dcd736f07837f Mon Sep 17 00:00:00 2001 From: Twilight Date: Mon, 6 May 2024 19:20:40 +0800 Subject: [PATCH] add dockerfile --- Dockerfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fd2b362 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +ARG PG_MAJOR=16 +FROM postgres:$PG_MAJOR +ARG PG_MAJOR + + +# Base +RUN mkdir -p /tmp/build && apt-get update && \ + apt-mark hold locales && \ + apt-get install -y --no-install-recommends build-essential git postgresql-server-dev-$PG_MAJOR + +# PG VECTOR +RUN git clone https://github.com/pgvector/pgvector /tmp/build/pgvector && cd /tmp/build/pgvector && \ + make clean && \ + make OPTFLAGS="" && \ + make install && \ + mkdir /usr/share/doc/pgvector && \ + cp LICENSE README.md /usr/share/doc/pgvector + + +# TIMESCALE +RUN git clone https://github.com/timescale/timescaledb /tmp/build/timescaledb && cd /tmp/build/timescaledb && \ + git checkout 2.14.2 && ./bootstrap && cd build && make && make install + +# CLEAN +RUN rm -r /tmp/build && \ + apt-get remove -y build-essential postgresql-server-dev-$PG_MAJOR && \ + apt-get autoremove -y && \ + apt-mark unhold locales && \ + rm -rf /var/lib/apt/lists/* \ No newline at end of file