Skip to content

Commit

Permalink
Merge pull request #12 from paramsingh/dockerfile-copy-order
Browse files Browse the repository at this point in the history
BU-8: Copy and install requirements before copying code
  • Loading branch information
paramsingh authored Feb 24, 2018
2 parents bdcab5a + c2857b7 commit 8420319
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion test/Dockerfile.py2
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
git
COPY . /code/

COPY requirements.txt /code/requirements.txt
COPY requirements_dev.txt /code/requirements_dev.txt
RUN pip install -r requirements.txt
RUN pip install -r requirements_dev.txt

COPY . /code/

ENV REDIS_HOST "redis"

CMD dockerize -wait tcp://redis:6379 -timeout 10s \
Expand Down
6 changes: 5 additions & 1 deletion test/Dockerfile.py3
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
git
COPY . /code/

COPY requirements.txt /code/requirements.txt
COPY requirements_dev.txt /code/requirements_dev.txt
RUN pip install -r requirements.txt
RUN pip install -r requirements_dev.txt

COPY . /code/

ENV REDIS_HOST "redis"

CMD dockerize -wait tcp://redis:6379 -timeout 10s \
Expand Down

0 comments on commit 8420319

Please sign in to comment.