-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
27 lines (20 loc) · 997 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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 Dashboard dependencies
COPY requirements.txt .
COPY requirements-no-dash.txt .
RUN pip install --no-cache-dir -r requirements-no-dash.txt
# Install latest Sageworks
RUN pip install --no-cache-dir 'sageworks[ml-tool,chem]'==0.8.22
# Remove setuptools (vulnerability)
RUN apt-get remove --purge -y python3-setuptools python3-pkg-resources
# 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