Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (26 loc) · 1.76 KB
/
Copy pathDockerfile
File metadata and controls
32 lines (26 loc) · 1.76 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
30
31
32
# [Choice] Python version (use -trixie or -bookworm variants to pin the OS): 3, 3.15, 3.14, 3.13, 3.12, 3.11, 3-trixie, 3.15-trixie, 3.14-trixie, 3.13-trixie, 3.12-trixie, 3.11-trixie, 3-bookworm, 3.15-bookworm, 3.14-bookworm, 3.13-bookworm, 3.12-bookworm, 3.11-bookworm
ARG VARIANT=3-trixie
FROM python:${VARIANT}
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131
&& apt-get purge -y imagemagick imagemagick-6-common
# Temporary: Upgrade python packages due to https://nvd.nist.gov/vuln/detail/cve-2026-59890 and https://github.com/advisories/GHSA-g5vv-9gxw-82hx
# They are installed by the base image (python) which does not have the patch.
RUN python3 -m pip install --upgrade \
gitpython==3.1.60 \
setuptools==83.0.0 \
wheel==0.46.3
# Fixing vulnerability issue by upgrading svn to 1.14.5. Ref https://subversion.apache.org/security/CVE-2024-46901-advisory.txt
COPY ./scripts/install-subversion.sh /tmp/install-subversion.sh
RUN chmod +x /tmp/install-subversion.sh
RUN /tmp/install-subversion.sh \
&& rm -f /tmp/install-subversion.sh
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
# COPY requirements.txt /tmp/pip-tmp/
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
# && rm -rf /tmp/pip-tmp
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1