@@ -63,87 +63,126 @@ COPY bitnami/timescaledb-bitnami-entrypoint.sh /opt/bitnami/scripts/postgresql/
6363
6464USER 0
6565ARG 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
148187USER 1001
149188
0 commit comments