Skip to content

Commit de4fa5d

Browse files
Merge pull request #2 from jayanth-kumar-morem/pg15_zombodb
Pg15 zombodb
2 parents 82377ae + fa4d0fa commit de4fa5d

3 files changed

Lines changed: 45 additions & 12 deletions

File tree

Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ RUN apk add --no-cache --virtual .build-deps \
8787
krb5-dev \
8888
libc-dev \
8989
llvm15 \
90-
clang \
9190
make \
9291
cmake \
92+
clang15 \
9393
util-linux-dev \
9494
&& git clone --branch v0.4.1 https://github.com/pgvector/pgvector.git \
9595
&& cd /pgvector \
@@ -141,8 +141,8 @@ RUN set -eux \
141141
&& if [ $(printf %.1s "$POSTGIS_VERSION") == 3 ]; then \
142142
set -eux ; \
143143
export GEOS_ALPINE_VER=3.11 ; \
144-
export GDAL_ALPINE_VER=3.5 ; \
145-
export PROJ_ALPINE_VER=9.1 ; \
144+
export GDAL_ALPINE_VER=3.6.4-r4 ; \
145+
export PROJ_ALPINE_VER=9.2.0-r0 ; \
146146
elif [ $(printf %.1s "$POSTGIS_VERSION") == 2 ]; then \
147147
set -eux ; \
148148
export GEOS_ALPINE_VER=3.8 ; \
@@ -184,6 +184,7 @@ RUN set -eux \
184184
autoconf \
185185
automake \
186186
clang-dev \
187+
clang15 \
187188
cunit-dev \
188189
file \
189190
g++ \
@@ -194,6 +195,7 @@ RUN set -eux \
194195
libtool \
195196
libxml2-dev \
196197
llvm-dev \
198+
llvm15 \
197199
make \
198200
pcre-dev \
199201
perl \
@@ -242,13 +244,12 @@ RUN apk add --no-cache --virtual .zombodb-build-deps \
242244
util-linux-dev \
243245
musl-dev \
244246
openssl-dev \
245-
clang-libs \
246-
clang-dev \
247+
clang15 \
247248
tar \
248249
&& gem install --no-document fpm \
249250
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y \
250251
&& PATH=$HOME/.cargo/bin:$PATH \
251-
&& cargo install cargo-pgrx \
252+
&& cargo install cargo-pgrx --version 0.8.3 \
252253
&& cargo pgrx init --${PG_VER}=$(which pg_config) \
253254
&& git clone https://github.com/zombodb/zombodb.git \
254255
&& cd ./zombodb \

bitnami/Dockerfile

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,7 @@ RUN set -ex \
122122
"${HOME}/.cache" \
123123
/var/lib/apt/lists/* \
124124
/tmp/* \
125-
/var/tmp/* \
126-
\
127-
# Update shared_preload_libraries
128-
&& sed -i "s/#shared_preload_libraries = ''/shared_preload_libraries = 'citus,timescaledb'/g" /opt/bitnami/postgresql/conf/postgresql.conf
125+
/var/tmp/*
129126

130127
# Add PostGIS Extension
131128
ARG POSTGIS_MAJOR
@@ -145,6 +142,41 @@ RUN apt-get update \
145142
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
146143
&& rm -rf /var/lib/apt/lists/*
147144

145+
# Install zombodb extension
146+
RUN apt-get update -y -qq --fix-missing \
147+
&& apt-get install -y wget gnupg \
148+
&& echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main" >> /etc/apt/sources.list \
149+
&& echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list \
150+
&& wget --quiet -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
151+
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 \
152+
&& apt update \
153+
&& apt-get update -y --fix-missing \
154+
&& apt-get install -y git curl clang-14 llvm-14 gcc make build-essential libz-dev zlib1g-dev strace pkg-config lsb-release wget software-properties-common gnupg libreadline-dev libgdbm-dev libssl1.0-dev \
155+
&& wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz \
156+
&& tar -xzvf openssl-1.0.2l.tar.gz \
157+
&& cd openssl-1.0.2l \
158+
&& ./config \
159+
&& make install \
160+
&& ln -sf /usr/local/ssl/bin/openssl `which openssl` \
161+
&& mkdir ruby \
162+
&& cd ruby \
163+
&& wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.gz \
164+
&& tar xvfz ruby-2.3.0.tar.gz \
165+
&& cd ruby-2.3.0 \
166+
&& ./configure --with-openssl-dir=/usr/include/openssl-1.0 \
167+
&& make -j64 \
168+
&& make install \
169+
&& gem install --no-document fpm \
170+
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
171+
&& export PATH="/.cargo/bin:$PATH" \
172+
&& export PGRX_HOME="/.pgrx/" \
173+
&& mkdir -p $PGRX_HOME \
174+
&& cargo install cargo-pgrx --version 0.8.3 \
175+
&& cargo pgrx init --pg${PG_MAJOR}=/opt/bitnami/postgresql/bin/pg_config \
176+
&& git clone https://github.com/zombodb/zombodb.git \
177+
&& cd zombodb \
178+
&& export PATH="/.cargo/bin:$PATH" && cargo pgrx install --release
179+
148180
USER 1001
149181

150182
ENTRYPOINT [ "/opt/bitnami/scripts/postgresql/timescaledb-bitnami-entrypoint.sh" ]

bitnami/timescaledb-bitnami-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# the shared preload list, or else it gets overwritten.
55
if [ -z "$POSTGRESQL_SHARED_PRELOAD_LIBRARIES" ]
66
then
7-
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb"
7+
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb,zombodb"
88
else
9-
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb,$POSTGRESQL_SHARED_PRELOAD_LIBRARIES"
9+
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb,zombodb,$POSTGRESQL_SHARED_PRELOAD_LIBRARIES"
1010
fi
1111
export POSTGRESQL_SHARED_PRELOAD_LIBRARIES
1212

0 commit comments

Comments
 (0)