3737# further details.
3838# ==============================================================================
3939
40- ARG BASE_IMAGE=base-test-image:latest
40+ ARG BASE_IMAGE=ghcr.io/pgedge/ base-test-image:latest
4141FROM ${BASE_IMAGE}
4242
4343# ==============================================================================
@@ -92,6 +92,22 @@ RUN set -eux && \
9292COPY . /home/pgedge/spock
9393COPY --chmod=755 tests/docker/*.sh /home/pgedge/
9494
95+ # ==============================================================================
96+ # Clone & Install Spockbench Testing Framework (needs root privileges)
97+ # ==============================================================================
98+
99+ # Clone spockbench for testing workloads
100+ # TODO: Pin to specific tag/commit for reproducibility
101+ RUN set -eux && \
102+ git clone --branch delta-apply-update --depth 1 \
103+ https://github.com/pgEdge/spockbench.git /home/pgedge/spockbench && \
104+ echo "export SPOCKBENCH_SOURCE_DIR=/home/pgedge/spockbench" >> /home/pgedge/.bashrc
105+
106+ RUN set -eux && \
107+ cd /home/pgedge/spockbench && \
108+ python3 setup.py install && \
109+ echo "Spockbench installation complete"
110+
95111# Set proper ownership
96112RUN chown -R pgedge:pgedge /home/pgedge/
97113
@@ -119,17 +135,6 @@ RUN set -eux && \
119135 git clone --branch "${LATEST_TAG}" --depth 1 \
120136 https://github.com/postgres/postgres.git /home/pgedge/postgres
121137
122- # ==============================================================================
123- # Clone Spockbench Testing Framework
124- # ==============================================================================
125-
126- # Clone spockbench for testing workloads
127- # TODO: Pin to specific tag/commit for reproducibility
128- RUN set -eux && \
129- git clone --branch delta-apply-update --depth 1 \
130- https://github.com/pgEdge/spockbench.git /home/pgedge/spockbench && \
131- echo "export SPOCKBENCH_SOURCE_DIR=/home/pgedge/spockbench" >> /home/pgedge/.bashrc
132-
133138# ==============================================================================
134139# Apply Spock Patches to PostgreSQL
135140# ==============================================================================
@@ -183,13 +188,13 @@ RUN set -eux && \
183188 echo "========================================" && \
184189 echo "Building PostgreSQL (${MAKE_JOBS} jobs)" && \
185190 echo "========================================" && \
186- make -j${MAKE_JOBS} && \
187- make -C contrib -j${MAKE_JOBS} && \
191+ make -j${MAKE_JOBS} > /dev/null && \
192+ make -C contrib -j${MAKE_JOBS} > /dev/null && \
188193 echo "========================================" && \
189194 echo "Installing PostgreSQL" && \
190195 echo "========================================" && \
191- make install && \
192- make -C contrib install && \
196+ make install > /dev/null && \
197+ make -C contrib install > /dev/null && \
193198 echo "PostgreSQL installation complete"
194199
195200# ==============================================================================
@@ -202,21 +207,12 @@ RUN set -eux && \
202207 echo "========================================" && \
203208 echo "Building Spock Extension" && \
204209 echo "========================================" && \
205- make clean && \
206- make -j${MAKE_JOBS} && \
207- make install && \
210+ make clean > /dev/null && \
211+ make -j${MAKE_JOBS} > /dev/null && \
212+ make install > /dev/null && \
208213 echo "export SPOCK_SOURCE_DIR=/home/pgedge/spock" >> /home/pgedge/.bashrc && \
209214 echo "Spock installation complete"
210215
211- # ==============================================================================
212- # Install spockbench
213- # ==============================================================================
214-
215- RUN set -eux && \
216- cd /home/pgedge/spockbench && \
217- sudo python3 setup.py install && \
218- echo "Spockbench installation complete"
219-
220216# ==============================================================================
221217# Runtime Configuration
222218# ==============================================================================
0 commit comments