forked from DataDog/dd-trace-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.buster
96 lines (84 loc) · 3.19 KB
/
Dockerfile.buster
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# 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:buster-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
# https://support.circleci.com/hc/en-us/articles/360045268074-Build-Fails-with-Too-long-with-no-output-exceeded-10m0s-context-deadline-exceeded-
ENV PYTHONUNBUFFERED=1
ENV NODE_VERSION=node_16.x
RUN \
# Install system dependencies
apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
build-essential \
ca-certificates \
clang-format \
curl \
git \
gnupg \
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 \
libsqliteodbc \
libssh-dev \
libssl-dev \
patch \
python-openssl\
unixodbc-dev \
valgrind \
wget \
zlib1g-dev \
# Setup Node.js package repository
# DEV: The nodejs available with the main repo doesn't install npm
# https://github.com/nodesource/distributions/blob/025fe79908872abd39c590a45893b59929cb91e6/README.md#debmanual
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
&& echo "deb https://deb.nodesource.com/${NODE_VERSION} buster main" | tee /etc/apt/sources.list.d/nodesource.list \
&& echo "deb-src https://deb.nodesource.com/${NODE_VERSION} buster main" | tee -a /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends nodejs \
&& apt-get install -y libmariadb3 \
# 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/pyenv/pyenv.git "${PYENV_ROOT}"
# Install all required python versions
RUN \
pyenv install 2.7.18 \
&& pyenv install 3.5.10 \
&& pyenv install 3.6.12 \
&& pyenv install 3.7.9 \
&& pyenv install 3.8.7 \
&& pyenv install 3.9.1 \
&& pyenv install 3.10.0 \
# Order matters: first version is the global one
&& pyenv global 3.9.1 2.7.18 3.5.10 3.6.12 3.7.9 3.8.7 3.10.0 \
&& pip install --upgrade pip
# Install sirun for running benchmarks
# https://github.com/DataDog/sirun
ENV SIRUN_VERSION=0.1.6
RUN \
wget https://github.com/DataDog/sirun/releases/download/v${SIRUN_VERSION}/sirun-v${SIRUN_VERSION}-x86_64-unknown-linux-gnu.tar.gz \
&& tar -C /usr/local/bin/ -zxf sirun-v${SIRUN_VERSION}-x86_64-unknown-linux-gnu.tar.gz \
&& rm sirun-v${SIRUN_VERSION}-x86_64-unknown-linux-gnu.tar.gz
# Install datadog-ci tool for uploading JUnit XML reports
# https://www.npmjs.com/package/@datadog/datadog-ci
RUN npm install -g @datadog/datadog-ci
CMD ["/bin/bash"]