2017-03-07 22:41:05 +01:00
|
|
|
FROM pillar_base
|
2018-08-30 11:37:53 +02:00
|
|
|
LABEL maintainer="Sybren A. Stüvel <sybren@blender.studio>"
|
2017-03-07 22:41:05 +01:00
|
|
|
|
|
|
|
RUN sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list && \
|
|
|
|
apt-get update && \
|
2018-08-30 11:37:53 +02:00
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -qy \
|
2017-03-07 22:41:05 +01:00
|
|
|
build-essential \
|
2017-03-08 12:32:54 +01:00
|
|
|
apache2-dev \
|
2017-03-07 22:41:05 +01:00
|
|
|
checkinstall \
|
|
|
|
curl
|
|
|
|
|
2018-02-01 15:52:59 +01:00
|
|
|
RUN apt-get build-dep -y python3.6
|
2017-03-07 22:41:05 +01:00
|
|
|
|
2018-08-30 11:37:53 +02:00
|
|
|
ADD Python-3.6.6.tar.xz.md5 /Python-3.6.6.tar.xz.md5
|
2017-03-07 22:41:05 +01:00
|
|
|
|
2017-03-08 12:32:54 +01:00
|
|
|
# Install Python sources
|
2018-08-30 11:37:53 +02:00
|
|
|
RUN curl -O https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz && \
|
|
|
|
md5sum -c Python-3.6.6.tar.xz.md5 && \
|
|
|
|
tar xf Python-3.6.6.tar.xz && \
|
|
|
|
rm -v Python-3.6.6.tar.xz
|
2017-03-08 12:32:54 +01:00
|
|
|
|
|
|
|
# Install mod-wsgi sources
|
|
|
|
RUN mkdir -p /dpkg && cd /dpkg && apt-get source libapache2-mod-wsgi-py3
|
2017-03-07 22:41:05 +01:00
|
|
|
|
|
|
|
# To be able to install Python outside the docker.
|
|
|
|
VOLUME /opt/python
|
|
|
|
|
2017-03-08 12:32:54 +01:00
|
|
|
# To be able to run Python; after building, ldconfig has to be re-run to do this.
|
|
|
|
# This makes it easier to use Python right after building (for example to build
|
|
|
|
# mod-wsgi for Python 3.6).
|
|
|
|
RUN echo /opt/python/lib > /etc/ld.so.conf.d/python.conf
|
|
|
|
RUN ldconfig
|
|
|
|
ENV PATH=/opt/python/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
|
2018-08-30 11:37:53 +02:00
|
|
|
ENV PYTHONSOURCE=/Python-3.6.6
|