Move Docker files

This commit is contained in:
Ben Merritt 2018-02-16 20:22:24 -08:00
parent d3475b0d83
commit b22c086e10
4 changed files with 6 additions and 2 deletions

View File

@ -10,10 +10,10 @@ COPY ./ /data/
RUN chown -R postgres:postgres /data/
# Patch the entrypoint script so it always initializes the DB.
RUN patch /usr/local/bin/docker-entrypoint.sh < /data/docker-entrypoint.patch
RUN patch /usr/local/bin/docker-entrypoint.sh < /data/docker/docker-entrypoint.patch
# Build pg_libphonenumber.
WORKDIR /data
RUN make && make install
CMD ["/data/run-tests.sh", "${PG_MAJOR}"]
CMD ["/data/docker/run-tests.sh", "${PG_MAJOR}"]

4
run_tests.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
docker build -t pg_libphonenumber_test -f docker/Dockerfile .
docker run -it --mount type=tmpfs,destination=/var/lib/postgresql/data pg_libphonenumber_test