Added PG_MAJOR arg to Dockerfile [skip ci]

This commit is contained in:
Andrew Kane
2023-04-01 13:15:00 -07:00
parent 55aeba8bd6
commit 96ae1a6a72

View File

@@ -1,9 +1,13 @@
FROM postgres:15
ARG PG_MAJOR=15
FROM postgres:$PG_MAJOR
ARG PG_MAJOR
COPY . /tmp/pgvector
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential postgresql-server-dev-15 && \
apt-get install -y --no-install-recommends build-essential postgresql-server-dev-$PG_MAJOR && \
cd /tmp/pgvector && \
make clean && \
make OPTFLAGS="" && \
@@ -11,6 +15,6 @@ RUN apt-get update && \
mkdir /usr/share/doc/pgvector && \
cp LICENSE README.md /usr/share/doc/pgvector && \
rm -r /tmp/pgvector && \
apt-get remove -y build-essential postgresql-server-dev-15 && \
apt-get remove -y build-essential postgresql-server-dev-$PG_MAJOR && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*