FROM postgres:17 # Install build & test dependencies RUN apt-get update && apt-get install -y \ build-essential \ postgresql-server-dev-17 \ pgxnclient \ perl \ libtest-harness-perl \ git \ && rm -rf /var/lib/apt/lists/* # Install pgTAP from source for PG17 compatibility RUN git clone --depth 1 https://github.com/theory/pgtap.git /tmp/pgtap \ && cd /tmp/pgtap \ && make \ && make install \ && rm -rf /tmp/pgtap # Install pg_prove (TAP test runner) RUN cpan TAP::Parser::SourceHandler::pgTAP # Copy extension source COPY . /build/pg_accumulator WORKDIR /build/pg_accumulator # Build and install the C extension RUN make clean && make && make install