diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 3ab23751df44a9df91e3dccabfbd2904aa795ecb..174d42e4c49132927b98184c12955013f2ac13ab 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,20 +1,32 @@ FROM debian:latest RUN apt-get update && \ - apt-get install \ - curl \ - git \ - openjdk-11-jdk-headless \ - python-autopep8 \ - python3-pip \ - tox \ - -y + apt-get install \ + curl \ + git \ + openjdk-11-jdk-headless \ + python-autopep8 \ + python3-pip \ + tox \ + -y COPY .docker/wait-for-it.sh /wait-for-it.sh ARG PYLIB=dev ADD https://gitlab.com/api/v4/projects/13656973/repository/commits/${PYLIB} \ - pylib_version.json + pylib_version.json RUN git clone https://gitlab.com/caosdb/caosdb-pylib.git && \ - cd caosdb-pylib && git checkout ${PYLIB} && pip3 install . + cd caosdb-pylib && git checkout ${PYLIB} && pip3 install . COPY . /git -RUN rm -r /git/.git && mv /git/.docker/pycaosdb.ini /git + +# Delete .git because it is huge. +RUN rm -r /git/.git + +# Install pycaosdb.ini for the tests +RUN mv /git/.docker/tester_pycaosdb.ini /git/pycaosdb.ini + + WORKDIR /git -CMD /wait-for-it.sh caosdb-server:10443 -t 500 -- tox +# wait for server, +CMD /wait-for-it.sh caosdb-server:10443 -t 500 -- \ + # ... install pycaosdb.ini the server-side scripts + cp /git/.docker/sss_pycaosdb.ini /scripting/home/.pycaosdb.ini && \ + # ... and run tests + tox