postgre-with-ext/Dockerfile

40 lines
1.6 KiB
Docker
Raw Permalink Normal View History

2025-02-16 23:38:19 +00:00
ARG PG_MAJOR=17
2024-05-06 11:20:40 +00:00
FROM postgres:$PG_MAJOR
ARG PG_MAJOR
2024-05-06 12:57:55 +00:00
2025-02-16 23:38:19 +00:00
# why no apt
RUN apt update && \
apt install -y postgresql-$PG_MAJOR-timescaledb postgresql-$PG_MAJOR-age postgresql-$PG_MAJOR-pgvector && \
rm -rf /var/lib/apt/lists/*
2024-05-06 11:20:40 +00:00
# Base
2025-02-16 23:38:19 +00:00
# RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
# rm -rf /etc/apt/sources.list.d/debian.sources && \
# mkdir -p /tmp/build && apt-get update && \
# apt-mark hold locales && \
# apt-get install -y --no-install-recommends build-essential cmake postgresql-server-dev-$PG_MAJOR
2024-05-06 12:38:54 +00:00
2024-05-06 11:20:40 +00:00
# PG VECTOR
2025-02-16 23:38:19 +00:00
# COPY pgvector /tmp/build/pgvector
# RUN cd /tmp/build/pgvector && \
# make clean && \
# make OPTFLAGS="" && \
# make install && \
# mkdir /usr/share/doc/pgvector && \
# cp LICENSE README.md /usr/share/doc/pgvector
2024-05-06 11:20:40 +00:00
2025-02-16 23:38:19 +00:00
# # TIMESCALE
# COPY timescaledb /tmp/build/timescaledb
# RUN cd /tmp/build/timescaledb && ./bootstrap && cd build && make && make install
2024-05-06 11:20:40 +00:00
# CLEAN
2025-02-16 23:38:19 +00:00
# RUN rm -rf /tmp/build && \
# apt-get autoremove --purge -y build-essential git postgresql-server-dev-$PG_MAJOR && \
# apt-mark unhold locales && \
# rm -rf /var/lib/apt/lists/*