-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating Dockerfiles to remove packages with vulnerabilities
- Loading branch information
1 parent
c91bfb6
commit 1d16e26
Showing
2 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
# Use Python 3.10 | ||
FROM python:3.10.13 | ||
# Use Python 3.12 as the base image | ||
FROM python:3.12.5-bookworm | ||
|
||
# Remove git from the base image (vulnerability) | ||
RUN apt-get remove --purge -y git && apt-get autoremove -y && apt-get clean | ||
|
||
# Remove AOM from the base image (vulnerability) | ||
RUN apt-get remove --purge -y libaom3 && apt-get autoremove -y && apt-get clean | ||
|
||
# Upgrade the nghttp2 package to fix a vulnerability | ||
RUN apt-get update && apt-get install -y libnghttp2-dev && apt-get clean | ||
|
||
# Install SageWorks dependencies | ||
COPY requirements.txt . | ||
COPY requirements-no-dash.txt . | ||
RUN pip install --no-cache-dir -r requirements-no-dash.txt | ||
|
||
# Install latest Sageworks (no dependencies) | ||
RUN pip install --no-cache-dir --no-deps 'sageworks[ml-tools,chem]'==0.7.0 | ||
RUN pip install --no-cache-dir --no-deps 'sageworks[ml-tools,chem]'==0.8.2 | ||
|
||
# Remove pip (vulnerability) | ||
RUN python -m pip uninstall -y pip && \ | ||
rm -rf /usr/local/lib/python*/dist-packages/pip /usr/local/bin/pip* && \ | ||
apt-get autoremove -y && apt-get clean \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters