Skip to content

Commit

Permalink
Merge pull request #1 from LinuxSuRen/build
Browse files Browse the repository at this point in the history
doc: add badge of the docker hub image
  • Loading branch information
LinuxSuRen authored Mar 21, 2024
2 parents ebdddf8 + 6b7703b commit 71eb7dc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: PG_MAJOR=15,PGVECTOR_TAG=v0.6.2

image-dockerhub:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -74,3 +75,4 @@ jobs:
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: PG_MAJOR=15,PGVECTOR_TAG=v0.6.2
29 changes: 25 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
FROM bitnami/postgresql:15.6.0-debian-12-r7
ARG PGVECTOR_TAG=v0.6.2
ARG PG_MAJOR=16
FROM bitnami/git:2.44.0 AS git

ARG PGVECTOR_TAG
WORKDIR /workspace
RUN git clone https://github.com/pgvector/pgvector && cd pgvector && git checkout ${PGVECTOR_TAG}

ARG PG_MAJOR
FROM bitnami/postgresql:${PG_MAJOR}-debian-12

USER root
RUN apt update -y && apt install -y postgresql-common
RUN echo yes | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
RUN apt install postgresql-16-pgvector -y
COPY --from=git /workspace/pgvector /tmp/pgvector
RUN apt-get update && \
apt-mark hold locales && \
apt-get install -y --no-install-recommends build-essential && \
cd /tmp/pgvector && \
make clean && \
make OPTFLAGS="" && \
make install && \
mkdir /usr/share/doc/pgvector && \
cp LICENSE README.md /usr/share/doc/pgvector && \
rm -r /tmp/pgvector && \
apt-get remove -y build-essential && \
apt-get autoremove -y && \
apt-mark unhold locales && \
rm -rf /var/lib/apt/lists/*
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/linuxsuren/pgvector)](https://hub.docker.com/r/linuxsuren/pgvector)

# pgvector-docker
Docker image of pgvector

Expand Down

0 comments on commit 71eb7dc

Please sign in to comment.