This repository was archived by the owner on Apr 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·46 lines (37 loc) · 1.52 KB
/
Dockerfile
File metadata and controls
executable file
·46 lines (37 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# docker build --build-arg PG_VERSION=13 -t subzerocloud/pgtap:pg13 .
# docker build --build-arg PG_VERSION=12 -t subzerocloud/pgtap:pg12 .
# docker build --build-arg PG_VERSION=11 -t subzerocloud/pgtap:pg11 .
# docker build --build-arg PG_VERSION=10 -t subzerocloud/pgtap:pg10 .
# docker build --build-arg PG_VERSION=9.6 -t subzerocloud/pgtap:pg9 .
ARG PG_VERSION
FROM postgres:${PG_VERSION}-alpine
MAINTAINER Andreas Wålm <andreas@walm.net>
MAINTAINER Ludovic Claude <ludovic.claude@chuv.ch>
MAINTAINER Ruslan Talpa <ruslan.talpa@gmail.com>
ARG PG_VERSION
ARG PGTAP_VERSION=v1.1.0
ENV DOCKERIZE_VERSION=v0.6.1
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 \
&& wget -O /tmp/dockerize.tar.gz https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-${DOCKERIZE_VERSION}.tar.gz \
&& tar -C /usr/local/bin -xzvf /tmp/dockerize.tar.gz \
&& rm -rf /var/cache/apk/* /tmp/*
# install pg_prove
RUN cpan TAP::Parser::SourceHandler::pgTAP
# install pgtap
RUN git clone git://github.com/theory/pgtap.git \
&& cd pgtap && git checkout tags/$PGTAP_VERSION \
&& make
COPY docker/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 [""]