Skip to content

Commit 7e7715b

Browse files
committed
Merge pull request deis#803 from helgi/ticket_303
ref(Dockerfile): only trigger package installation if requirement.txt changes
2 parents 4262297 + eba900f commit 7e7715b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rootfs/Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN adduser --system \
77
--group \
88
deis
99

10-
COPY . /app
10+
COPY requirements.txt /app/requirements.txt
1111

1212
RUN buildDeps='gcc git libffi-dev libpq-dev python3-dev'; \
1313
apt-get update && \
@@ -16,14 +16,16 @@ RUN buildDeps='gcc git libffi-dev libpq-dev python3-dev'; \
1616
libpq5 \
1717
python3 \
1818
sudo && \
19-
ln -s /usr/bin/python3 /usr/bin/python && \
19+
ln -s /usr/bin/python3 /usr/bin/python && \
2020
curl -sSL https://bootstrap.pypa.io/get-pip.py | python - pip==8.1.2 && \
2121
mkdir -p /configs && chown -R deis:deis /configs && \
2222
pip install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt && \
2323
apt-get purge -y --auto-remove $buildDeps && \
2424
apt-get clean && \
2525
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc
2626

27+
COPY . /app
28+
2729
# define execution environment
2830
WORKDIR /app
2931
CMD ["/app/bin/boot"]

0 commit comments

Comments
 (0)