This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
forked from DataDog/dd-trace-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
66 lines (58 loc) · 1.73 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# DEV: Use `debian:slim` instead of an `alpine` image to support installing wheels from PyPI
# this drastically improves test execution time since python dependencies don't all
# have to be built from source all the time (grpcio takes forever to install)
FROM debian:stretch-slim
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
RUN \
# Install system dependencies
apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
git \
jq \
libbz2-dev \
libenchant-dev \
libffi-dev \
liblzma-dev \
libmariadb-dev \
libmariadb-dev-compat \
libmemcached-dev \
libmemcached-dev \
libncurses5-dev \
libncursesw5-dev \
libpq-dev \
libreadline-dev \
libsasl2-dev \
libsqlite3-dev \
libssh-dev \
libssl1.0-dev \
patch \
python-openssl\
wget \
zlib1g-dev \
clang-format \
unixodbc-dev \
libsqliteodbc \
# Cleaning up apt cache space
&& rm -rf /var/lib/apt/lists/*
# Configure PATH environment for pyenv
ENV PYENV_ROOT /root/.pyenv
ENV PATH ${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:$PATH
# Install pyenv
RUN git clone git://github.com/yyuu/pyenv.git "${PYENV_ROOT}"
# Install all required python versions
RUN \
pyenv install 2.7.17 \
&& pyenv install 3.5.10 \
&& pyenv install 3.6.12 \
&& pyenv install 3.7.9 \
&& pyenv install 3.8.6 \
&& pyenv install 3.9.0 \
# Order matters: first version is the global one
&& pyenv global 3.8.6 2.7.17 3.5.10 3.6.12 3.7.9 3.9.0 \
&& pip install --upgrade pip
CMD ["/bin/bash"]