1414
1515# This Dockerfile creates a debug helper base image for Python.
1616# It provides installations of debugpy, ptvsd, pydevd, and pydevd-pycharm
17- # for Python 2.7, 3.7, 3.8, and 3.9.
17+ # for Python 2.7, 3.5, 3.6, 3.7, 3.8, and 3.9.
18+ # - Apache Beam is based around Python 3.5
19+ # - Many ML/NLP images are based on Python 3.6
1820#
1921# debugpy and ptvsd are well-structured packages installed in separate
2022# directories under # /dbg/python/lib/pythonX.Y/site-packages and
2729
2830FROM python:2.7 as python27
2931RUN PYTHONUSERBASE=/dbgpy pip install --user ptvsd debugpy
30- RUN PYTHONUSERBASE=/dbgpy/pydevd/python2.7 pip install --user pydevd
31- RUN PYTHONUSERBASE=/dbgpy/pydevd-pycharm/python2.7 pip install --user pydevd-pycharm
32+ RUN PYTHONUSERBASE=/dbgpy/pydevd/python2.7 pip install --user pydevd --no-warn-script-location
33+ RUN PYTHONUSERBASE=/dbgpy/pydevd-pycharm/python2.7 pip install --user pydevd-pycharm --no-warn-script-location
34+
35+ FROM python:3.5 as python35
36+ RUN PYTHONUSERBASE=/dbgpy pip install --user ptvsd debugpy
37+ RUN PYTHONUSERBASE=/dbgpy/pydevd/python3.5 pip install --user pydevd --no-warn-script-location
38+ RUN PYTHONUSERBASE=/dbgpy/pydevd-pycharm/python3.5 pip install --user pydevd-pycharm --no-warn-script-location
39+
40+ FROM python:3.6 as python36
41+ RUN PYTHONUSERBASE=/dbgpy pip install --user ptvsd debugpy
42+ RUN PYTHONUSERBASE=/dbgpy/pydevd/python3.6 pip install --user pydevd --no-warn-script-location
43+ RUN PYTHONUSERBASE=/dbgpy/pydevd-pycharm/python3.6 pip install --user pydevd-pycharm --no-warn-script-location
3244
3345FROM python:3.7 as python37
3446RUN PYTHONUSERBASE=/dbgpy pip install --user ptvsd debugpy
35- RUN PYTHONUSERBASE=/dbgpy/pydevd/python3.7 pip install --user pydevd
36- RUN PYTHONUSERBASE=/dbgpy/pydevd-pycharm/python3.7 pip install --user pydevd-pycharm
47+ RUN PYTHONUSERBASE=/dbgpy/pydevd/python3.7 pip install --user pydevd --no-warn-script-location
48+ RUN PYTHONUSERBASE=/dbgpy/pydevd-pycharm/python3.7 pip install --user pydevd-pycharm --no-warn-script-location
3749
3850FROM python:3.8 as python38
3951RUN PYTHONUSERBASE=/dbgpy pip install --user ptvsd debugpy
40- RUN PYTHONUSERBASE=/dbgpy/pydevd/python3.8 pip install --user pydevd
41- RUN PYTHONUSERBASE=/dbgpy/pydevd-pycharm/python3.8 pip install --user pydevd-pycharm
52+ RUN PYTHONUSERBASE=/dbgpy/pydevd/python3.8 pip install --user pydevd --no-warn-script-location
53+ RUN PYTHONUSERBASE=/dbgpy/pydevd-pycharm/python3.8 pip install --user pydevd-pycharm --no-warn-script-location
4254
4355FROM python:3.9 as python39
4456RUN PYTHONUSERBASE=/dbgpy pip install --user ptvsd debugpy
45- RUN PYTHONUSERBASE=/dbgpy/pydevd/python3.9 pip install --user pydevd
46- RUN PYTHONUSERBASE=/dbgpy/pydevd-pycharm/python3.9 pip install --user pydevd-pycharm
57+ RUN PYTHONUSERBASE=/dbgpy/pydevd/python3.9 pip install --user pydevd --no-warn-script-location
58+ RUN PYTHONUSERBASE=/dbgpy/pydevd-pycharm/python3.9 pip install --user pydevd-pycharm --no-warn-script-location
4759
4860FROM golang:1.14.1 as build
4961COPY launcher/ .
@@ -60,6 +72,8 @@ COPY install.sh /
6072CMD ["/bin/sh" , "/install.sh" ]
6173WORKDIR /duct-tape
6274COPY --from=python27 /dbgpy/ python/
75+ COPY --from=python35 /dbgpy/ python/
76+ COPY --from=python36 /dbgpy/ python/
6377COPY --from=python37 /dbgpy/ python/
6478COPY --from=python38 /dbgpy/ python/
6579COPY --from=python39 /dbgpy/ python/
0 commit comments