Skip to content

Commit f6f8718

Browse files
committed
Don't cache pip packages in docker images
The pip cache increases the size of the docker images needlessly
1 parent c828e73 commit f6f8718

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

example-average-color/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
FROM python:3.11-slim
22
LABEL maintainer="Kitware, Inc. <[email protected]>"
33

4-
RUN pip install --find-links https://girder.github.io/large_image_wheels large_image[sources]
5-
RUN pip install girder-slicer-cli-web
4+
RUN pip install --no-cache-dir --find-links https://girder.github.io/large_image_wheels large_image[sources]
5+
6+
RUN pip install --no-cache-dir girder-slicer-cli-web
67

78
COPY . /
89
ENTRYPOINT ["python", "./cli_list.py"]

example-girder-requests/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
FROM python:3.11-slim
22
MAINTAINER David Manthey <[email protected]>
33

4-
RUN pip install --find-links https://girder.github.io/large_image_wheels large_image[sources]
5-
RUN pip install girder-slicer-cli-web
6-
RUN pip install girder-client
4+
RUN pip install --no-cache--dir --find-links https://girder.github.io/large_image_wheels large_image[sources]
5+
RUN pip install --no-cache--dir girder-slicer-cli-web
6+
RUN pip install --no-cache--dir girder-client
77

88
COPY . $PWD
99
ENTRYPOINT ["python", "./cli_list.py"]

small-docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN chmod a+x /usr/local/bin/groupadd
1414
RUN touch /usr/local/bin/useradd
1515
RUN chmod a+x /usr/local/bin/useradd
1616

17-
RUN pip install girder-slicer-cli-web
17+
RUN pip install --no-cache-dir girder-slicer-cli-web
1818
COPY . $PWD
1919

2020
ENTRYPOINT ["python", "./cli_list.py"]

0 commit comments

Comments
 (0)