2018-02-10 03:21:56 +00:00
|
|
|
FROM postgres:10
|
2017-03-13 19:11:05 +00:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
build-essential \
|
2017-03-15 20:24:51 +00:00
|
|
|
postgresql-server-dev-${PG_MAJOR} \
|
2017-07-06 17:07:28 +00:00
|
|
|
libphonenumber-dev \
|
2017-03-13 19:11:05 +00:00
|
|
|
sudo
|
|
|
|
|
|
|
|
COPY ./ /data/
|
|
|
|
RUN chown -R postgres:postgres /data/
|
|
|
|
|
|
|
|
# Patch the entrypoint script so it always initializes the DB.
|
2018-02-17 04:22:24 +00:00
|
|
|
RUN patch /usr/local/bin/docker-entrypoint.sh < /data/docker/docker-entrypoint.patch
|
2017-03-13 19:11:05 +00:00
|
|
|
|
2017-07-06 17:07:28 +00:00
|
|
|
# Build pg_libphonenumber.
|
2017-03-13 19:11:05 +00:00
|
|
|
WORKDIR /data
|
|
|
|
RUN make && make install
|
2017-07-06 17:07:28 +00:00
|
|
|
|
2018-02-17 04:22:24 +00:00
|
|
|
CMD ["/data/docker/run-tests.sh", "${PG_MAJOR}"]
|