Skip to content

Commit 6b5e220

Browse files
committed
Purge dormant conda package cache archives to eliminate remaining 11 CVEs
1 parent 90c7ef1 commit 6b5e220

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tfx/tools/docker/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ RUN for pkg in golang-go golang git binutils wget policykit-1 packagekit gnupg2
195195
apt-get autoremove -y && \
196196
apt-get clean
197197

198-
# 5. Force upgrade vulnerable Python runtime libraries and purge unused submodules
198+
# 5. Force upgrade vulnerable Python runtime libraries and purge unused submodules and conda cache
199199
RUN python -m pip install --upgrade --no-cache-dir \
200200
pip \
201201
wheel \
@@ -205,7 +205,9 @@ RUN python -m pip install --upgrade --no-cache-dir \
205205
idna \
206206
keras \
207207
tf_keras || true && \
208-
(python -m pip uninstall -y mistune pyopenssl pygments python-dotenv jaraco jaraco-context jaraco.context jaraco.classes jaraco.functools || true)
208+
(python -m pip uninstall -y mistune pyopenssl pygments python-dotenv jaraco jaraco-context jaraco.context jaraco.classes jaraco.functools || true) && \
209+
conda clean --all -f -y && \
210+
rm -rf /opt/conda/pkgs/*
209211

210212
RUN echo "Installed python packages:\n" && python -m pip list && \
211213
echo "Setuptools version:" && python -c "import setuptools; print(setuptools.__version__)"

0 commit comments

Comments
 (0)