33 lines
1.4 KiB
Docker
33 lines
1.4 KiB
Docker
ARG PG_MAJOR=16
|
|
ARG GOLANG_VER=1.21
|
|
|
|
FROM golang:$GOLANG_VER-bookworm AS timebuild
|
|
|
|
RUN apt update && apt install -y build-essential
|
|
RUN go install github.com/timescale/timescaledb-tune/cmd/timescaledb-tune@latest
|
|
RUN go install github.com/timescale/timescaledb-parallel-copy/cmd/timescaledb-parallel-copy@latest
|
|
|
|
FROM postgres:$PG_MAJOR-bookworm
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
ARG TS_REF=2.13.0
|
|
ARG PGVECTOR_REF=v0.5.1
|
|
ARG PGVECTOR_HASH=e630efd195c563496c3550abb1817303586ee46d1
|
|
|
|
RUN apt-get update && \
|
|
apt-mark hold locales && \
|
|
apt-get install -y --no-install-recommends build-essential ca-certificates git cmake libkrb5-dev postgresql-server-dev-$PG_MAJOR
|
|
|
|
RUN git clone --branch $PGVECTOR_REF --depth 1 https://github.com/pgvector/pgvector.git /tmp/pgvector/
|
|
WORKDIR /tmp/pgvector/
|
|
RUN make && make install
|
|
|
|
COPY --from=timebuild /go/bin/* /usr/local/bin/
|
|
RUN git clone --branch $TS_REF https://github.com/timescale/timescaledb /tmp/timescaledb
|
|
WORKDIR /tmp/timescaledb
|
|
RUN ./bootstrap -DCMAKE_BUILD_TYPE=RelWithDebInfo -DREGRESS_CHECKS=OFF -DTAP_CHECKS=OFF -DGENERATE_DOWNGRADE_SCRIPT=ON -DWARNINGS_AS_ERRORS=OFF -DPROJECT_INSTALL_METHOD="docker"
|
|
RUN cd build && make && make install
|
|
RUN sed -r -i "s/[#]*\s*(shared_preload_libraries)\s*=\s*'(.*)'/\1 = 'timescaledb,\2'/;s/,'/'/" /usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample
|
|
COPY docker-entrypoint-initdb.d/* /docker-entrypoint-initdb.d/
|
|
WORKDIR /
|
|
|