| 1 |
FROM resin/raspberrypi3-debian:wheezy |
| 2 |
|
| 3 |
RUN apt-get update && \ |
| 4 |
apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev unzip && \ |
| 5 |
apt-get install -y libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev wget && \ |
| 6 |
apt-get install -y libexpat1-dev liblzma-dev zlib1g-dev cmake curl libffi-dev tk-dev libc6-dev |
| 7 |
# TODO: patchelf |
| 8 |
|
| 9 |
# Build OpenSSL 1.0.2g |
| 10 |
ENV OPENSSL_VERSION 1.0.2g |
| 11 |
RUN curl -O https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz && \ |
| 12 |
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz && \ |
| 13 |
mv openssl-$OPENSSL_VERSION openssl_armv7l_src && \ |
| 14 |
cd openssl_armv7l_src && \ |
| 15 |
./Configure linux-armv4 no-shared -static --openssldir=/opt/uamqp/openssl --prefix=/opt/uamqp/openssl && \ |
| 16 |
make && \ |
| 17 |
make install |
| 18 |
|
| 19 |
# Build Python 3.4 |
| 20 |
RUN curl -O https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tar.xz && \ |
| 21 |
tar xf Python-3.4.1.tar.xz && \ |
| 22 |
cd Python-3.4.1 && \ |
| 23 |
./configure && \ |
| 24 |
make && \ |
| 25 |
sudo make altinstall |
| 26 |
|
| 27 |
# Build Python 3.5 |
| 28 |
RUN curl -O https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tar.xz && \ |
| 29 |
tar xf Python-3.5.5.tar.xz && \ |
| 30 |
cd Python-3.5.5 && \ |
| 31 |
./configure && \ |
| 32 |
make && \ |
| 33 |
sudo make altinstall |
| 34 |
|
| 35 |
# Build Python 3.6 |
| 36 |
RUN curl -O https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz && \ |
| 37 |
tar xf Python-3.6.6.tar.xz && \ |
| 38 |
cd Python-3.6.6 && \ |
| 39 |
./configure && \ |
| 40 |
make && \ |
| 41 |
sudo make altinstall |
| 42 |
|
| 43 |
# Build Python 3.7 |
| 44 |
RUN apt-get install -y libffi-dev tk-dev libc6-dev |
| 45 |
RUN curl -O https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz && \ |
| 46 |
tar xf Python-3.7.0.tar.xz && \ |
| 47 |
cd Python-3.7.0 && \ |
| 48 |
./configure && \ |
| 49 |
make && \ |
| 50 |
sudo make altinstall |
| 51 |
|
| 52 |
# Install setup for Python 3.4 |
| 53 |
RUN wget https://github.com/pypa/setuptools/archive/v40.0.0.tar.gz && \ |
| 54 |
tar xf v40.0.0.tar.gz && \ |
| 55 |
cd setuptools-40.0.0 && \ |
| 56 |
python3.4 bootstrap.py && \ |
| 57 |
python3.4 setup.py install |
| 58 |
RUN wget https://files.pythonhosted.org/packages/21/89/ca320e5b45d381ae0df74c4b5694f1471c1b2453c5eb4bac3449f5970481/Cython-0.28.5.tar.gz#sha256=b64575241f64f6ec005a4d4137339fb0ba5e156e826db2fdb5f458060d9979e0 && \ |
| 59 |
tar xf Cython-0.28.5.tar.gz && \ |
| 60 |
cd Cython-0.28.5 && \ |
| 61 |
python3.4 setup.py install |
| 62 |
RUN wget https://files.pythonhosted.org/packages/2a/fb/aefe5d5dbc3f4fe1e815bcdb05cbaab19744d201bbc9b59cfa06ec7fc789/wheel-0.31.1.tar.gz#sha256=0a2e54558a0628f2145d2fc822137e322412115173e8a2ddbe1c9024338ae83c && \ |
| 63 |
tar xf wheel-0.31.1.tar.gz && \ |
| 64 |
cd wheel-0.31.1 && \ |
| 65 |
python3.4 setup.py install |
| 66 |
RUN wget https://files.pythonhosted.org/packages/cf/f7/21e21195874e85718ae2826774023a4601170199ebb32db451e447d19d91/auditwheel-1.9.0.tar.gz#sha256=fe8cbf74d16e7d1a89fd96b689f8e16f196edfb66cc98eb8a345bc03e28fed63 && \ |
| 67 |
tar xf auditwheel-1.9.0.tar.gz && \ |
| 68 |
cd auditwheel-1.9.0 && \ |
| 69 |
python3.4 setup.py install |
| 70 |
|
| 71 |
# Install setup for Python 3.5, 3.6, 3.7 |
| 72 |
RUN pip3.5 install cython wheel auditwheel |
| 73 |
RUN pip3.6 install cython wheel auditwheel |
| 74 |
#RUN pip3.7 install cython wheel auditwheel |
| 75 |
|
| 76 |
# Build cmake 2.8.11 |
| 77 |
RUN curl -O https://cmake.org/files/v2.8/cmake-2.8.11.tar.gz && \ |
| 78 |
tar xvf cmake-2.8.11.tar.gz && \ |
| 79 |
cd cmake-2.8.11 && \ |
| 80 |
./bootstrap && \ |
| 81 |
make && \ |
| 82 |
make install |
| 83 |
|
| 84 |
ENTRYPOINT /bin/bash |