From 472dca3011cd7e6d4779c299e2ac81bea224b303 Mon Sep 17 00:00:00 2001 From: ivamp Date: Mon, 6 May 2024 20:57:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c059c59..57416a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ ARG PG_MAJOR=16 FROM postgres:$PG_MAJOR ARG PG_MAJOR + + # Base RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \ echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \ @@ -9,11 +11,12 @@ RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib rm -rf /etc/apt/sources.list.d/debian.sources && \ 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 + apt-get install -y --no-install-recommends build-essential git cmake postgresql-server-dev-$PG_MAJOR # PG VECTOR -RUN git clone https://github.com/pgvector/pgvector /tmp/build/pgvector && cd /tmp/build/pgvector && \ +COPY pgvector /tmp/build/pgvector +RUN cd /tmp/build/pgvector && \ make clean && \ make OPTFLAGS="" && \ make install && \ @@ -22,8 +25,8 @@ RUN git clone https://github.com/pgvector/pgvector /tmp/build/pgvector && cd /tm # 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 +COPY timescaledb /tmp/build/timescaledb +RUN cd /tmp/build/timescaledb && git checkout . && git checkout 2.14.2 && ./bootstrap && cd build && make && make install # CLEAN RUN rm -r /tmp/build && \