File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,13 @@ jobs:
3434 username : ${{ github.actor }}
3535 password : ${{ secrets.GITHUB_TOKEN }}
3636
37- - name : Build and push Docker image
37+ - name : Build and Push Multi-Arch Image
3838 uses : docker/build-push-action@v5
3939 with :
4040 context : .
4141 file : ./Dockerfile
4242 push : true
43+ platforms : linux/amd64,linux/arm64
4344 tags : |
4445 ghcr.io/${{ github.repository }}:${{ steps.docker_meta.outputs.VERSION }}
4546 ghcr.io/${{ github.repository }}:latest
Original file line number Diff line number Diff line change 11ARG PG_MAJOR=17
2- FROM postgis/postgis:$PG_MAJOR-3.5
2+ ARG PG_VECTOR_VERSION=0.8.0
3+ # See https://github.com/postgis/docker-postgis/issues/216
4+ FROM imresamu/postgis:$PG_MAJOR-3.5-bookworm
35ARG PG_MAJOR
6+ ARG PG_VECTOR_VERSION
47
58LABEL org.opencontainers.image.title="postgis-vector" \
69 org.opencontainers.image.description="postgresql+postgis container with pgvector added" \
710 org.opencontainers.image.vendor="Payload" \
811 org.opencontainers.image.authors=
"Payload <[email protected] >" \
9- org.opencontainers.image.version="17-3.5 " \
12+ org.opencontainers.image.version="17-4.0 " \
1013 org.opencontainers.image.licenses="MIT" \
1114 org.opencontainers.image.url="https://github.com/payloadcms/postgis-vector" \
1215 org.opencontainers.image.source="https://github.com/payloadcms/postgis-vector"
@@ -15,12 +18,17 @@ RUN apt-get update \
1518 && apt-mark hold locales \
1619 && apt-get install -qq -y --no-install-recommends \
1720 build-essential \
21+ git \
1822 clang-13 \
1923 llvm-13 \
2024 llvm-13-dev \
2125 pgxnclient \
2226 postgresql-server-dev-$PG_MAJOR \
23- && pgxn install 'vector=0.8.0' \
27+ && git clone --branch v"${PG_VECTOR_VERSION}" https://github.com/pgvector/pgvector.git /tmp/pgvector \
28+ && cd /tmp/pgvector \
29+ && make && make install \
30+ && cd / \
31+ && rm -rf /tmp/pgvector \
2432 && apt-get remove -y build-essential clang-13 llvm-13 llvm-13-dev postgresql-server-dev-$PG_MAJOR \
2533 && apt-get autoremove -y \
2634 && apt-get clean \
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- docker build --platform=linux/amd64 - t pgtest .
3+ docker build -t pgtest .
You can’t perform that action at this time.
0 commit comments