Skip to content

Commit 22417c6

Browse files
committed
Skip pip's caching behavior
This imports the official repository's fix. Please see the following URL for more details. docker-library/python@7663560
1 parent aab4ee6 commit 22417c6

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

2.7/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ RUN tce-load -wic \
9191
&& sudo /sbin/ldconfig \
9292
&& rm -rf /tmp/tce/optional/* \
9393
&& curl -SL 'https://bootstrap.pypa.io/get-pip.py' | sudo python2 \
94-
&& sudo pip install --upgrade pip==$PYTHON_PIP_VERSION \
94+
&& sudo pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
9595
&& sudo find /usr/local \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf '{}' + \
9696
&& find /usr/local \( -type d -a -name test -o -name tests \) | sudo xargs rm -rf \
9797
&& sudo rm -rf /usr/src/python
@@ -100,6 +100,6 @@ RUN tce-load -wic \
100100
USER root
101101

102102
# install "virtualenv", since the vast majority of users of this image will want it
103-
RUN pip install virtualenv
103+
RUN pip install --no-cache-dir virtualenv
104104

105105
CMD ["python2"]

2.7/onbuild/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ RUN mkdir -p /usr/src/app
44
WORKDIR /usr/src/app
55

66
ONBUILD COPY requirements.txt /usr/src/app/
7-
ONBUILD RUN pip install -r requirements.txt
7+
ONBUILD RUN pip install --no-cache-dir -r requirements.txt
88

99
ONBUILD COPY . /usr/src/app

3.4/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ RUN tce-load -wic \
9393
&& sudo /sbin/ldconfig \
9494
&& rm -rf /tmp/tce/optional/* \
9595
&& curl -SL 'https://bootstrap.pypa.io/get-pip.py' | sudo python3 \
96-
&& sudo pip install --upgrade pip==$PYTHON_PIP_VERSION \
96+
&& sudo pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
9797
&& sudo find /usr/local \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf '{}' + \
9898
&& find /usr/local \( -type d -a -name test -o -name tests \) | sudo xargs rm -rf \
9999
&& sudo rm -rf /usr/src/python

3.4/onbuild/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ RUN mkdir -p /usr/src/app
44
WORKDIR /usr/src/app
55

66
ONBUILD COPY requirements.txt /usr/src/app/
7-
ONBUILD RUN pip install -r requirements.txt
7+
ONBUILD RUN pip install --no-cache-dir -r requirements.txt
88

99
ONBUILD COPY . /usr/src/app

0 commit comments

Comments
 (0)