File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -96,11 +96,12 @@ RUN apt-get update \
9696 python3 \
9797 python3-pip
9898
99- RUN pip install --upgrade pip setuptools wheel --break-system-packages
100- RUN pip install -r requirements.txt --break-system-packages
101- RUN apt autoremove -y
102- RUN apt clean -y
103- RUN rm -rf /tmp/* /var/tmp/*
99+ RUN pip install --no-cache-dir --upgrade pip setuptools wheel --break-system-packages
100+ RUN pip install --no-cache-dir -r requirements.txt --break-system-packages
101+
102+ # Clean up unnecessary files to reduce image size
103+ RUN rm -rf /root/.cache/pip && rm -rf /root/.cache/build && rm -rf /tmp/* && rm -rf /var/tmp/*
104+ RUN apt autoremove -y && apt clean -y
104105RUN find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete
105106RUN find /var/cache -type f -delete
106107
You can’t perform that action at this time.
0 commit comments