@@ -208,6 +208,46 @@ RUN set -eux \
208208 /tmp/* \
209209 /var/tmp/*
210210
211+ # Install zombodb extension
212+ ARG PG_MAJOR
213+ ENV RUSTFLAGS="-C target-cpu=native target-cpu=native link-arg=-fuse-ld=lld"
214+ RUN apt-get update -y -qq --fix-missing \
215+ && apt-get install -y wget gnupg \
216+ && echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main" >> /etc/apt/sources.list \
217+ && echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list \
218+ && wget --quiet -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
219+ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 \
220+ && apt update \
221+ && apt-get update -y --fix-missing \
222+ && apt-get install -y git curl clang-14 llvm-14 gcc make build-essential libz-dev zlib1g-dev pkg-config libreadline-dev libgdbm-dev libssl1.0-dev \
223+ && wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz \
224+ && tar -xzvf openssl-1.0.2l.tar.gz \
225+ && cd openssl-1.0.2l \
226+ && ./config \
227+ && make install \
228+ && ln -sf /usr/local/ssl/bin/openssl `which openssl` \
229+ && mkdir ruby \
230+ && cd ruby \
231+ && wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.gz \
232+ && tar xvfz ruby-2.3.0.tar.gz \
233+ && cd ruby-2.3.0 \
234+ && ./configure --with-openssl-dir=/usr/include/openssl-1.0 \
235+ && make -j64 \
236+ && make install \
237+ && gem install --no-document fpm \
238+ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
239+ && export PATH="/.cargo/bin:$PATH" \
240+ && export PGRX_HOME="/.pgrx/" \
241+ && mkdir -p $PGRX_HOME \
242+ && cargo install cargo-pgrx --version 0.9.3 \
243+ && cargo pgrx init --pg${PG_MAJOR}=/opt/bitnami/postgresql/bin/pg_config \
244+ && git clone --depth 1 --branch ${ZOMBODB_VERSION} https://github.com/zombodb/zombodb.git \
245+ && cd zombodb \
246+ && export PATH="/.cargo/bin:$PATH" && cargo pgrx install --release \
247+ && cd / \
248+ && apt-get autoremove --purge -y git curl clang-14 gcc make build-essential wget \
249+ && rm -rf .cargo .gem openssl-1.0.2l .rustup openssl-1.0.2l.tar.gz
250+
211251USER 1001
212252
213253ENTRYPOINT [ "/opt/bitnami/scripts/postgresql/timescaledb-bitnami-entrypoint.sh" ]
0 commit comments