Files
threshold/testing/dbtest/pgtap-docker/Dockerfile
T
Johan Brandhorst-Satzkorn de2c40fa77 Fork pgtap-docker to support arm64 (#2411)
* feat(sql): Fork pgtap to support arm64

This forks pgtap-docker and builds the image locally,
and updates our references to use our forked image.

* fixup! feat(sql): Fork pgtap to support arm64
2022-09-01 11:33:10 -04:00

35 lines
841 B
Docker

ARG PG_VERSION
FROM postgres:${PG_VERSION}-alpine
ARG PG_VERSION
ARG PGTAP_VERSION=v1.2.0
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.8/main'>> /etc/apk/repositories \
&& echo 'http://dl-cdn.alpinelinux.org/alpine/v3.6/main'>> /etc/apk/repositories \
&& apk add --no-cache --update curl wget git openssl \
build-base make perl perl-dev
# install pg_prove
RUN PERL_MM_USE_DEFAULT=1 cpan -T TAP::Harness::JUnit \
&& PERL_MM_USE_DEFAULT=1 cpan -T TAP::Parser::SourceHandler::pgTAP
# install pgtap
RUN git clone https://github.com/theory/pgtap.git \
&& cd pgtap && git checkout tags/$PGTAP_VERSION \
&& make
COPY test.sh /test.sh
RUN chmod +x /test.sh
WORKDIR /
ENV DATABASE="" \
HOST=db \
PORT=5432 \
USER="postgres" \
PASSWORD="" \
TESTS="/test/*.sql"
ENTRYPOINT ["/test.sh"]
CMD [""]