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 db72aed commit c33b180
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@ RUN apt-get update && \

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

ADD . /code
COPY CHANGES.rst README.rst setup.py /code/
COPY reana_job_controller/version.py /code/reana_job_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;

RUN adduser --uid 1000 --disabled-password --gecos '' reanauser && \
chown -R reanauser:reanauser /code
Expand Down

0 comments on commit c33b180

Please sign in to comment.