add pgtap on docker

This commit is contained in:
fpellet committed 2020-01-19 19:59:27 +01:00
1 parent c619c0235d
commit 2e4255f35e
3 files changed
+42 -11

No files matched your search

+24 -3
View File
@@ -10,14 +10,35 @@ ENV PGDATA /var/lib/postgresql/data_local
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
ADD ./*.sh /app/
ADD ./src /app/src
# PGUNIT
FROM base as pgunit
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates wget \
&& rm -rf /var/lib/apt/lists/*
ADD ./*.sh /app/
ADD ./src /app/src
ADD ./pgunit/initialize.sh /app/
ADD ./pgunit/*.sql /app/
RUN chmod +x ./*.sh \
&& ./initializeDocker.sh
# PGTAP
FROM base as pgtap
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates build-essential git-core libv8-dev curl postgresql-server-dev-12 \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /tmp/pgtap \
&& cd /tmp/pgtap \
&& git clone https://github.com/theory/pgtap.git /tmp/pgtap \
&& make \
&& make install \
&& cpan TAP::Parser::SourceHandler::pgTAP
ADD ./pgtap/initialize.sh /app/
RUN chmod +x ./*.sh \
&& ./initializeDocker.sh