mirror of
https://github.com/YuzuZensai/cloudnative-vectorchord-pgvecto.rs.git
synced 2026-01-31 14:57:18 +00:00
Enable multiarch build
This commit is contained in:
3
.github/workflows/docker.yml
vendored
3
.github/workflows/docker.yml
vendored
@@ -78,8 +78,7 @@ jobs:
|
|||||||
uses: docker/build-push-action@v4.1.1
|
uses: docker/build-push-action@v4.1.1
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
# TODO: Enable multiarch build
|
platforms: linux/amd64,linux/arm64
|
||||||
platforms: linux/amd64
|
|
||||||
push: ${{ !github.event.pull_request }}
|
push: ${{ !github.event.pull_request }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|||||||
10
Dockerfile
10
Dockerfile
@@ -1,14 +1,18 @@
|
|||||||
ARG CNPG_TAG
|
ARG CNPG_TAG
|
||||||
|
|
||||||
FROM ghcr.io/cloudnative-pg/postgresql:$CNPG_TAG
|
FROM curlimages/curl AS download
|
||||||
|
|
||||||
ARG PG_MAJOR
|
ARG PG_MAJOR
|
||||||
ARG PGVECTORS_TAG
|
ARG PGVECTORS_TAG
|
||||||
ARG ARCH=x86_64
|
|
||||||
|
WORKDIR /download
|
||||||
|
RUN curl -o pgvectors.deb -sSL https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg$PG_MAJOR-$PGVECTORS_TAG-$(uname -m)-unknown-linux-gnu.deb
|
||||||
|
|
||||||
|
FROM ghcr.io/cloudnative-pg/postgresql:$CNPG_TAG
|
||||||
|
|
||||||
# drop to root to install packages
|
# drop to root to install packages
|
||||||
USER root
|
USER root
|
||||||
ADD https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg$PG_MAJOR-$PGVECTORS_TAG-$ARCH-unknown-linux-gnu.deb ./pgvectors.deb
|
COPY --from=download /download/pgvectors.deb ./pgvectors.deb
|
||||||
RUN apt install ./pgvectors.deb
|
RUN apt install ./pgvectors.deb
|
||||||
|
|
||||||
USER postgres
|
USER postgres
|
||||||
|
|||||||
Reference in New Issue
Block a user