Added Dockerfile - #4 [skip ci]

This commit is contained in:
Andrew Kane
2021-05-06 14:31:32 -07:00
parent af86392a34
commit 62cc3398ed
2 changed files with 35 additions and 1 deletions

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM postgres
COPY . /tmp/pgvector
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential postgresql-server-dev-13 && \
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 postgresql-server-dev-13 && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*

View File

@@ -29,7 +29,7 @@ Then load it in databases where you want to use it
CREATE EXTENSION vector;
```
You can also install it with [Homebrew](#homebrew) or [PGXN](#pgxn)
You can also install it with [Docker](#docker), [Homebrew](#homebrew), or [PGXN](#pgxn)
## Getting Started
@@ -140,6 +140,24 @@ Libraries that use pgvector:
## Additional Installation Methods
### Docker
Get the [Docker image](https://hub.docker.com/repository/docker/ankane/pgvector) with:
```sh
docker pull ankane/pgvector
```
This adds pgvector to the [Postgres image](https://hub.docker.com/_/postgres).
You can also build the image manually
```sh
git clone https://github.com/ankane/pgvector.git
cd pgvector
docker build -t pgvector .
```
### Homebrew
On Mac with Homebrew Postgres, you can use: