Skip to content

Commit

Permalink
docker: improve Dockerfile for faster rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Rodriguez committed Jul 3, 2018
1 parent 42d0982 commit 236af39
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Dockerfile
Expand Up @@ -26,13 +26,19 @@ RUN apt-get update && \

RUN pip install -e git://github.com/reanahub/reana-commons.git@master#egg=reana-commons

ADD . /code
COPY CHANGES.rst README.rst setup.py /code/
COPY reana_workflow_controller/version.py /code/reana_workflow_controller/
WORKDIR /code
RUN pip install --no-cache-dir requirements-builder && \
requirements-builder -e all -l pypi setup.py | pip install --no-cache-dir -r /dev/stdin && \
pip uninstall -y requirements-builder

COPY . /code

# Debug off by default
ARG DEBUG=false

RUN if [ "${DEBUG}" = "true" ]; then pip install -r requirements-dev.txt; pip install -e .[all]; else pip install .[all]; fi;
RUN if [ "${DEBUG}" = "true" ]; then pip install -r requirements-dev.txt; pip install -e .; else pip install .; fi;

EXPOSE 5000
ENV FLASK_APP reana_workflow_controller/app.py
Expand Down

0 comments on commit 236af39

Please sign in to comment.