2020-04-01 14:48:51 +02:00
|
|
|
FROM ololobus/postgres-dev:stretch
|
|
|
|
|
|
|
|
USER root
|
|
|
|
RUN apt-get update
|
2020-05-07 13:47:20 +02:00
|
|
|
RUN apt-get -yq install python python-pip
|
|
|
|
|
|
|
|
# RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
|
|
|
# RUN python2 get-pip.py
|
|
|
|
RUN python2 -m pip install virtualenv
|
2020-04-01 14:48:51 +02:00
|
|
|
|
|
|
|
# Environment
|
|
|
|
ENV PG_MAJOR=${PG_VERSION} PG_BRANCH=${PG_BRANCH}
|
|
|
|
ENV LANG=C.UTF-8 PGHOME=/pg/testdir/pgbin
|
|
|
|
|
|
|
|
# Make directories
|
|
|
|
RUN mkdir -p /pg/testdir
|
|
|
|
|
|
|
|
COPY run_tests.sh /run.sh
|
|
|
|
RUN chmod 755 /run.sh
|
|
|
|
|
|
|
|
COPY . /pg/testdir
|
|
|
|
WORKDIR /pg/testdir
|
|
|
|
|
|
|
|
# Grant privileges
|
|
|
|
RUN chown -R postgres:postgres /pg/testdir
|
|
|
|
|
|
|
|
USER postgres
|
|
|
|
ENTRYPOINT MODE=${MODE} /run.sh
|