-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add PGVector for development image
Showing
5 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CREATE EXTENSION IF NOT EXISTS vector; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM postgis/postgis:16-3.5 | ||
|
||
RUN apt-get update \ | ||
&& apt-mark hold locales\ | ||
&& apt-get install -y --no-install-recommends git build-essential postgresql-server-dev-16 \ | ||
&& git clone --depth=1 --branch v0.7.3 https://github.com/pgvector/pgvector.git /tmp/pgvector \ | ||
&& cd /tmp/pgvector \ | ||
&& make clean && make OPTFLAGS="" && make install \ | ||
&& cd / \ | ||
&& rm -r /tmp/pgvector \ | ||
&& apt-get remove -y git build-essential postgresql-server-dev-16 \ | ||
&& apt-get autoremove -y \ | ||
&& apt-mark unhold locales \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY 20_pgvector.sql /docker-entrypoint-initdb.d/20_pgvector.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
docker build --platform linux/amd64 -t croquiscom/postgis-pgvector:16-3.5-0.7.3 . | ||
docker push croquiscom/postgis-pgvector:16-3.5-0.7.3 |