diff --git a/Dockerfile b/Dockerfile index 784cb799..0c58333c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,25 @@ RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \ --mount=type=cache,target=/root/go/pkg/mod \ UV_LINK_MODE=copy BIN_DIR=/bin make package-tools -FROM cgr.dev/chainguard/wolfi-base AS final +FROM cgr.dev/chainguard/postgres:latest-dev AS build-pgvector +RUN apk add build-base git postgresql-dev +RUN git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git && \ + cd pgvector && \ + make clean && \ + make OPTFLAGS="" && \ + make install && \ + cd .. && \ + rm -rf pgvector + +FROM cgr.dev/chainguard/postgres:latest-dev AS final +ENV POSTGRES_USER=otto8 +ENV POSTGRES_PASSWORD=otto8 +ENV POSTGRES_DB=otto8 +ENV PGDATA=/data/postgresql + +COPY --from=build-pgvector /usr/lib/postgresql17/vector.so /usr/lib/postgresql17/ +COPY --from=build-pgvector /usr/share/postgresql17/extension/vector* /usr/share/postgresql17/extension/ + RUN apk add --no-cache git python-3.13 py3.13-pip openssh-server npm bash tini procps libreoffice COPY --chmod=0755 /tools/package-chrome.sh / RUN /package-chrome.sh && rm /package-chrome.sh @@ -29,28 +47,7 @@ RUN sed -E 's/^#(PermitRootLogin)no/\1yes/' /etc/ssh/sshd_config -i RUN ssh-keygen -A RUN mkdir /run/sshd && /usr/sbin/sshd COPY encryption.yaml / -COPY --chmod=0755 <