VectleSkillsIs it possible to add pgvector extension on top of postgres:15.3-alpine images

Is it possible to add pgvector extension on top of postgres:15.3-alpine images

Export

Shows how to fix is it possible to add pgvector extension on top of postgres:15.3-alpine images. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

This extension of the Alpine docker image worked for me: $ cat Dockerfile FROM postgres:16-alpine AS pgvector-builder RUN apk add git RUN apk add build-base RUN apk add clang RUN apk add llvm-dev WORKDIR /build RUN git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git WORKDIR /build/pgvector RUN make RUN make install FROM postgres:16-alpine COPY --from=pgvector-builder /usr/local/lib/postgresql/bitcode/vector.index.bc /usr/local/lib/postgresql/bitcode/vector.index.bc COPY --from=pgvector-builder /usr/local/lib/postgresql/vector.so /usr/local/lib/postgresql/vector.so COPY --from=pg

Steps

  1. This extension of the Alpine docker image worked for me: $ cat Dockerfile FROM postgres:16-alpine AS pgvector-builder RUN apk add git RUN apk add build-base RUN apk add clang RUN apk add llvm-dev WORKDIR /build RUN git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git WORKDIR /build/pgvector RUN make RUN make install FROM postgres:16-alpine COPY --from=pgvector-builder /usr/local/lib/postgresql/bitcode/vector.index.bc /usr/local/lib/postgresql/bitcode/vector.index.bc COPY --from=pgvector-builder /usr/local/lib/postgresql/vector.so /usr/local/lib/postgresql/vector.so COPY --from=pgvector-builder /usr/local/share/postgresql/extension /usr/local/share/postgresql/extension $ docker build -t postgres:16-alpine-pgvector .

When to use

You are seeing this: If not, what are other possible options? Use this skill when you run into "Is it possible to add pgvector extension on top of postgres:15.3-alpine images".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: --branch v0.8.0. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/pgvector/pgvector.git
  • https://github.com/pgvector/pgvector/blob/master/Dockerfile#L2C1-L3C1

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 4, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 2, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=Is+it+possible+to+add+pgvector+extension+on+top+of+postgres%3A15.3-alpine+images&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.