Skip to content

Commit 77e60c2

Browse files
clang15 version specification
1 parent 82377ae commit 77e60c2

3 files changed

Lines changed: 133 additions & 85 deletions

File tree

.github/workflows/smoke-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ jobs:
7474
psql -c "CREATE EXTENSION zombodb;"
7575
psql -c "SELECT * FROM pg_extension WHERE extname = 'zombodb';"
7676
77+
psql -c "CREATE EXTENSION zombodb;"
78+
7779
break
7880
fi
7981
sleep 1

Dockerfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ RUN echo "shared_preload_libraries = 'citus,timescaledb,pg_stat_statements'" >>
7979
# Adding PG Vector
8080

8181
RUN cd /tmp
82+
83+
# Installing clang-15
84+
RUN
85+
8286
RUN apk add --no-cache --virtual .build-deps \
8387
coreutils \
8488
dpkg-dev dpkg \
@@ -87,9 +91,9 @@ RUN apk add --no-cache --virtual .build-deps \
8791
krb5-dev \
8892
libc-dev \
8993
llvm15 \
90-
clang \
9194
make \
9295
cmake \
96+
clang15 \
9397
util-linux-dev \
9498
&& git clone --branch v0.4.1 https://github.com/pgvector/pgvector.git \
9599
&& cd /pgvector \
@@ -141,8 +145,8 @@ RUN set -eux \
141145
&& if [ $(printf %.1s "$POSTGIS_VERSION") == 3 ]; then \
142146
set -eux ; \
143147
export GEOS_ALPINE_VER=3.11 ; \
144-
export GDAL_ALPINE_VER=3.5 ; \
145-
export PROJ_ALPINE_VER=9.1 ; \
148+
export GDAL_ALPINE_VER=3.6.4-r4 ; \
149+
export PROJ_ALPINE_VER=9.2.0-r0 ; \
146150
elif [ $(printf %.1s "$POSTGIS_VERSION") == 2 ]; then \
147151
set -eux ; \
148152
export GEOS_ALPINE_VER=3.8 ; \
@@ -184,6 +188,7 @@ RUN set -eux \
184188
autoconf \
185189
automake \
186190
clang-dev \
191+
clang15 \
187192
cunit-dev \
188193
file \
189194
g++ \
@@ -194,6 +199,7 @@ RUN set -eux \
194199
libtool \
195200
libxml2-dev \
196201
llvm-dev \
202+
llvm15 \
197203
make \
198204
pcre-dev \
199205
perl \
@@ -242,8 +248,9 @@ RUN apk add --no-cache --virtual .zombodb-build-deps \
242248
util-linux-dev \
243249
musl-dev \
244250
openssl-dev \
245-
clang-libs \
246-
clang-dev \
251+
# clang-libs \
252+
# clang-dev \
253+
clang15 \
247254
tar \
248255
&& gem install --no-document fpm \
249256
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y \

bitnami/Dockerfile

Lines changed: 119 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -63,87 +63,126 @@ COPY bitnami/timescaledb-bitnami-entrypoint.sh /opt/bitnami/scripts/postgresql/
6363

6464
USER 0
6565
ARG TS_VERSION
66-
RUN set -ex \
67-
&& rm -v /opt/bitnami/postgresql/lib/.emptyfile \
68-
&& rm -v /opt/bitnami/postgresql/share/extension/.emptyfile \
69-
&& mkdir -p /var/lib/apt/lists/partial \
70-
&& apt-get update \
71-
&& apt-get -y install \
72-
\
73-
build-essential \
74-
libssl-dev \
75-
git \
76-
\
77-
dpkg-dev \
78-
gcc \
79-
libc-dev \
80-
make \
81-
cmake \
82-
wget \
83-
&& mkdir -p /build/ \
84-
&& git clone https://github.com/timescale/timescaledb /build/timescaledb \
85-
\
86-
# Build current version \
87-
&& cd /build/timescaledb && rm -fr build \
88-
&& git checkout ${TS_VERSION} \
89-
&& ./bootstrap -DCMAKE_BUILD_TYPE=RelWithDebInfo -DREGRESS_CHECKS=OFF -DTAP_CHECKS=OFF -DGENERATE_DOWNGRADE_SCRIPT=ON -DWARNINGS_AS_ERRORS=OFF -DPROJECT_INSTALL_METHOD="docker-bitnami" \
90-
&& cd build && make install \
91-
&& cd ~ \
92-
\
93-
# Install Citus
94-
&& apt-get update \
95-
&& apt-get install -y curl liblz4-dev libzstd-dev clang libkrb5-dev libicu-dev libxslt1-dev libxml2-dev llvm-dev libcurl4-openssl-dev \
96-
&& CITUS_DOWNLOAD_URL="https://github.com/citusdata/citus/archive/refs/tags/v${CITUS_VERSION}.tar.gz" \
97-
&& curl -L -o /tmp/citus.tar.gz "${CITUS_DOWNLOAD_URL}" \
98-
&& tar -C /tmp -xvf /tmp/citus.tar.gz \
99-
&& addgroup --system postgres \
100-
&& adduser --system --ingroup postgres --home /opt/bitnami/postgresql --no-create-home postgres \
101-
&& chown -R postgres:postgres /tmp/citus-${CITUS_VERSION} \
102-
&& cd /tmp/citus-${CITUS_VERSION} \
103-
&& PATH="/opt/bitnami/postgresql/bin:$PATH" ./configure \
104-
&& make \
105-
&& make install \
106-
&& cd ~ \
107-
&& rm -rf /tmp/citus.tar.gz /tmp/citus-${CITUS_VERSION} \
108-
\
109-
&& apt-get autoremove --purge -y \
110-
\
111-
build-essential \
112-
libssl-dev \
113-
\
114-
dpkg-dev \
115-
gcc \
116-
libc-dev \
117-
make \
118-
cmake \
119-
&& apt-get clean -y \
120-
&& rm -rf \
121-
/build \
122-
"${HOME}/.cache" \
123-
/var/lib/apt/lists/* \
124-
/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
66+
# RUN set -ex \
67+
# && rm -v /opt/bitnami/postgresql/lib/.emptyfile \
68+
# && rm -v /opt/bitnami/postgresql/share/extension/.emptyfile \
69+
# && mkdir -p /var/lib/apt/lists/partial \
70+
# && apt-get update \
71+
# && apt-get -y install \
72+
# \
73+
# build-essential \
74+
# libssl-dev \
75+
# git \
76+
# \
77+
# dpkg-dev \
78+
# gcc \
79+
# libc-dev \
80+
# make \
81+
# cmake \
82+
# wget \
83+
# && mkdir -p /build/ \
84+
# && git clone https://github.com/timescale/timescaledb /build/timescaledb \
85+
# \
86+
# # Build current version \
87+
# && cd /build/timescaledb && rm -fr build \
88+
# && git checkout ${TS_VERSION} \
89+
# && ./bootstrap -DCMAKE_BUILD_TYPE=RelWithDebInfo -DREGRESS_CHECKS=OFF -DTAP_CHECKS=OFF -DGENERATE_DOWNGRADE_SCRIPT=ON -DWARNINGS_AS_ERRORS=OFF -DPROJECT_INSTALL_METHOD="docker-bitnami" \
90+
# && cd build && make install \
91+
# && cd ~ \
92+
# \
93+
# # Install Citus
94+
# && apt-get update \
95+
# && apt-get install -y curl liblz4-dev libzstd-dev clang libkrb5-dev libicu-dev libxslt1-dev libxml2-dev llvm-dev libcurl4-openssl-dev \
96+
# && CITUS_DOWNLOAD_URL="https://github.com/citusdata/citus/archive/refs/tags/v${CITUS_VERSION}.tar.gz" \
97+
# && curl -L -o /tmp/citus.tar.gz "${CITUS_DOWNLOAD_URL}" \
98+
# && tar -C /tmp -xvf /tmp/citus.tar.gz \
99+
# && addgroup --system postgres \
100+
# && adduser --system --ingroup postgres --home /opt/bitnami/postgresql --no-create-home postgres \
101+
# && chown -R postgres:postgres /tmp/citus-${CITUS_VERSION} \
102+
# && cd /tmp/citus-${CITUS_VERSION} \
103+
# && PATH="/opt/bitnami/postgresql/bin:$PATH" ./configure \
104+
# && make \
105+
# && make install \
106+
# && cd ~ \
107+
# && rm -rf /tmp/citus.tar.gz /tmp/citus-${CITUS_VERSION} \
108+
# \
109+
# && apt-get autoremove --purge -y \
110+
# \
111+
# build-essential \
112+
# libssl-dev \
113+
# \
114+
# dpkg-dev \
115+
# gcc \
116+
# libc-dev \
117+
# make \
118+
# cmake \
119+
# && apt-get clean -y \
120+
# && rm -rf \
121+
# /build \
122+
# "${HOME}/.cache" \
123+
# /var/lib/apt/lists/* \
124+
# /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
129129

130-
# Add PostGIS Extension
131-
ARG POSTGIS_MAJOR
132-
ARG PG_MAJOR
133-
ARG POSTGIS_VERSION
134-
135-
RUN apt-get update \
136-
&& apt-get install -y lsb-release gnupg2 \
137-
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
138-
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
139-
&& apt-get update \
140-
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
141-
&& apt-get install -y --no-install-recommends \
142-
ca-certificates \
143-
\
144-
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \
145-
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
146-
&& rm -rf /var/lib/apt/lists/*
130+
# # Add PostGIS Extension
131+
# ARG POSTGIS_MAJOR
132+
# ARG PG_MAJOR
133+
# ARG POSTGIS_VERSION
134+
135+
# RUN apt-get update \
136+
# && apt-get install -y lsb-release gnupg2 \
137+
# && echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
138+
# && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
139+
# && apt-get update \
140+
# && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
141+
# && apt-get install -y --no-install-recommends \
142+
# ca-certificates \
143+
# \
144+
# postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \
145+
# postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
146+
# && rm -rf /var/lib/apt/lists/*
147+
148+
149+
RUN apt-get update -y -qq --fix-missing
150+
RUN apt-get install -y wget gnupg
151+
152+
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main 15" >> /etc/apt/sources.list.d/pgdg.list
153+
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
154+
RUN apt update
155+
RUN apt-get update -y --fix-missing
156+
157+
RUN apt-get install -y git
158+
RUN apt-get install -y curl
159+
RUN apt-get install -y clang llvm gcc make build-essential libz-dev zlib1g-dev strace libssl-dev pkg-config
160+
161+
RUN apt-get install lsb-release wget software-properties-common gnupg -y
162+
163+
# Try to install the dependencies one by one
164+
RUN wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 14
165+
166+
# RUN apt-get install -y postgresql-15 postgresql-server-dev-15
167+
168+
## b/c why not! http://www.inanzzz.com/index.php/post/3zs5/installing-ruby-on-debian-8
169+
RUN apt-get install -y libreadline-dev libgdbm-dev openssl
170+
RUN mkdir ruby && \
171+
cd ruby && \
172+
wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.gz && \
173+
tar xvfz ruby-2.3.0.tar.gz && \
174+
cd ruby-2.3.0 && \
175+
./configure && \
176+
make -j64 && \
177+
make install
178+
RUN gem install --no-document fpm
179+
180+
181+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
182+
ENV PATH="/home/.cargo/bin:${PATH}"
183+
RUN cargo install cargo-pgrx
184+
RUN cargo pgrx init \
185+
--pg15=/usr/lib/postgresql/15/bin/pg_config
147186

148187
USER 1001
149188

0 commit comments

Comments
 (0)