-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 1.08 KB
/
Copy pathDockerfile
File metadata and controls
29 lines (22 loc) · 1.08 KB
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
28
29
FROM python:3.11-slim
WORKDIR /app
# Apply any OS-level security patches Debian has published since this base
# image tag was built. A vulnerability scan found several CVEs in OS packages
# shipped with the base image; most had no fix available at scan time, but
# this keeps every future rebuild current with whatever Debian does publish,
# without needing another manual Dockerfile change each time.
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
# Install dependencies
COPY requirements.txt .
# The base image bundles whatever pip/setuptools/wheel version was current
# when that image tag was published. A vulnerability scan found known CVEs in
# those bundled versions (and jaraco-context, a pip dependency) — upgrade the
# build toolchain itself before installing anything else.
RUN pip install --no-cache-dir --upgrade pip setuptools wheel jaraco.context
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Ensure the data directory exists (SQLite volume mount point)
RUN mkdir -p /app/data
EXPOSE 7376
CMD ["python", "app.py"]