Skip to content

Commit

Permalink
Add Dockerfile and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rouge8 committed Dec 19, 2023
1 parent 4cb7353 commit ee16a8d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---

name: Build Docker image

env:
POSTGRES_VERSION: "15.3"
PGVECTOR_VERSION: "0.4.4"

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build image
run: |
docker build --build-arg="POSTGRES_VERSION=${POSTGRES_VERSION}" --build-arg="PGVECTOR_VERSION=${PGVECTOR_VERSION}" --tag "ghcr.io/Zapgram/cimg-postgres-pgvector:${POSTGRES_VERSION}-${PGVECTOR_VERSION}" .
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ARG POSTGRES_VERSION
ARG PGVECTOR_VERSION

FROM cimg/postgres:${POSTGRES_VERSION}

RUN cd /tmp \
&& git clone --branch v${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git \
&& cd pgvector \
&& make \
&& make install \
&& cd /tmp \
&& rm -rf /tmp/pgvector

0 comments on commit ee16a8d

Please sign in to comment.