pg.ddx.io pgvector/pgvector GitHub issues and pull requests
help / color / mirror / Atom feed[pgvector/pgvector] PR #655: Docker image for Alpine (92.73 MB vs 147.31 MB)
3+ messages / 2 participants
[nested] [flat]
* [pgvector/pgvector] PR #655: Docker image for Alpine (92.73 MB vs 147.31 MB)
@ 2024-08-23 16:21 "SamuelMarks (@SamuelMarks)" <noreply+SamuelMarks@github.com>
0 siblings, 0 replies; 3+ messages in thread
From: SamuelMarks (@SamuelMarks) @ 2024-08-23 16:21 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
I've been [building](https://github.com/SamuelMarks/pgvector-builds) Alpine versions of your project https://hub.docker.com/r/samuelmarks/pgvector-builds/tags. It's 62% of [the size](https://hub.docker.com/r/pgvector/pgvector/tags); so IMHO probably good to include in your repo properly and release on your official hub.docker.com.
inline patch 1: alpine.Dockerfile (+32/-0 lines) download inline-1.patch
diff --git a/alpine.Dockerfile b/alpine.Dockerfile
new file mode 100644
index 000000000..c22810d86
--- /dev/null
+++ b/alpine.Dockerfile
@@ -0,0 +1,32 @@
+ARG PG_MAJOR=16
+
+FROM postgres:${PG_MAJOR}-alpine AS builder
+ARG PG_MAJOR
+
+RUN apk add --no-cache build-base clang15 llvm15 postgresql${PG_MAJOR}-dev
+
+COPY . /tmp/pgvector
+WORKDIR /tmp/pgvector
+RUN make clean && \
+ make OPTFLAGS="" && \
+ make install && \
+ mkdir -p /usr/share/doc/pgvector && \
+ cp LICENSE README.md /usr/share/doc/pgvector
+
+FROM postgres:${PG_MAJOR}-alpine AS runner
+ARG PG_MAJOR
+
+COPY --from=builder /usr/share/doc/pgvector /usr/share/doc/pgvector
+COPY --from=builder /usr/local/lib/postgresql /usr/local/lib/postgresql
+COPY --from=builder /var/lib/postgresql /var/lib/postgresql
+COPY --from=builder /usr/local/share/postgresql /usr/local/share/postgresql
+COPY --from=builder /usr/local/bin/postgres /usr/local/bin/postgres
+COPY --from=builder /usr/local/include/postgresql /usr/local/include/postgresql
+COPY --from=builder /usr/local/include/postgres_ext.h /usr/local/include/
+COPY --from=builder /usr/local/bin/postgres /usr/local/bin/
+
+STOPSIGNAL SIGINT
+
+EXPOSE 5432
+
+CMD ["postgres"]
^ permalink raw [nested|flat] 3+ messages in thread
* Re: [pgvector/pgvector] PR #655: Docker image for Alpine (92.73 MB vs 147.31 MB)
@ 2024-08-23 16:43 ` "ankane (@ankane)" <noreply+ankane@github.com>
1 sibling, 0 replies; 3+ messages in thread
From: ankane (@ankane) @ 2024-08-23 16:43 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Hi @SamuelMarks, thanks for another PR, but I still have the same thoughts as #193.
^ permalink raw [nested|flat] 3+ messages in thread
* Re: [pgvector/pgvector] PR #655: Docker image for Alpine (92.73 MB vs 147.31 MB)
@ 2024-08-23 16:43 ` "ankane (@ankane)" <noreply+ankane@github.com>
1 sibling, 0 replies; 3+ messages in thread
From: ankane (@ankane) @ 2024-08-23 16:43 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane closed this.
^ permalink raw [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-08-23 16:43 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-23 16:21 [pgvector/pgvector] PR #655: Docker image for Alpine (92.73 MB vs 147.31 MB) "SamuelMarks (@SamuelMarks)" <noreply+SamuelMarks@github.com>
2024-08-23 16:43 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-08-23 16:43 ` "ankane (@ankane)" <noreply+ankane@github.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox