File tree Expand file tree Collapse file tree 3 files changed +33
-26
lines changed Expand file tree Collapse file tree 3 files changed +33
-26
lines changed Original file line number Diff line number Diff line change 1
- FROM buildpack-deps
2
-
3
- RUN apt-get update && apt-get install -y curl procps
1
+ FROM buildpack-deps:jessie
4
2
5
3
# remove several traces of debian python
6
- RUN apt-get purge -y python python-minimal python2.7-minimal
4
+ RUN apt-get purge -y python.*
7
5
8
6
# http://bugs.python.org/issue19846
9
7
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
10
8
ENV LANG C.UTF-8
11
9
12
10
ENV PYTHON_VERSION 2.7.8
13
11
14
- RUN mkdir -p /usr/src/python \
12
+ RUN set -x \
13
+ && mkdir -p /usr/src/python \
15
14
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
16
15
| tar -xJC /usr/src/python --strip-components=1 \
17
16
&& cd /usr/src/python \
18
- && ./configure \
17
+ && ./configure --enable-shared \
19
18
&& make -j$(nproc) \
20
19
&& make install \
21
- && cd / \
20
+ && ldconfig \
21
+ && curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python2 \
22
+ && find /usr/local \
23
+ \( -type d -a -name test -o -name tests \) \
24
+ -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
25
+ -exec rm -rf '{}' + \
22
26
&& rm -rf /usr/src/python
23
27
24
- # install "pip" and "virtualenv", since the vast majority of users of this image will want it
25
- RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python2
28
+ # install "virtualenv", since the vast majority of users of this image will want it
26
29
RUN pip install virtualenv
27
30
28
31
CMD ["python2" ]
Original file line number Diff line number Diff line change 1
- FROM buildpack-deps
2
-
3
- RUN apt-get update && apt-get install -y curl procps
1
+ FROM buildpack-deps:jessie
4
2
5
3
# remove several traces of debian python
6
- RUN apt-get purge -y python python-minimal python2.7-minimal
4
+ RUN apt-get purge -y python.*
7
5
8
6
# http://bugs.python.org/issue19846
9
7
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
10
8
ENV LANG C.UTF-8
11
9
12
10
ENV PYTHON_VERSION 3.3.6
13
11
14
- RUN mkdir -p /usr/src/python \
12
+ RUN set -x \
13
+ && mkdir -p /usr/src/python \
15
14
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
16
15
| tar -xJC /usr/src/python --strip-components=1 \
17
16
&& cd /usr/src/python \
18
- && ./configure \
17
+ && ./configure --enable-shared \
19
18
&& make -j$(nproc) \
20
19
&& make install \
21
- && cd / \
20
+ && ldconfig \
21
+ && curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
22
+ && find /usr/local \
23
+ \( -type d -a -name test -o -name tests \) \
24
+ -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
25
+ -exec rm -rf '{}' + \
22
26
&& rm -rf /usr/src/python
23
27
24
28
# make some useful symlinks that are expected to exist
25
29
RUN cd /usr/local/bin \
26
- && ln -s easy_install-3.4 easy_install \
27
30
&& ln -s idle3 idle \
28
31
&& ln -s pydoc3 pydoc \
29
32
&& ln -s python3 python \
30
33
&& ln -s python-config3 python-config
31
34
32
- RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python3
33
-
34
35
CMD ["python3" ]
Original file line number Diff line number Diff line change 1
- FROM buildpack-deps
2
-
3
- RUN apt-get update && apt-get install -y curl procps
1
+ FROM buildpack-deps:jessie
4
2
5
3
# remove several traces of debian python
6
- RUN apt-get purge -y python python-minimal python2.7-minimal
4
+ RUN apt-get purge -y python.*
7
5
8
6
# http://bugs.python.org/issue19846
9
7
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
10
8
ENV LANG C.UTF-8
11
9
12
10
ENV PYTHON_VERSION 3.4.2
13
11
14
- RUN mkdir -p /usr/src/python \
12
+ RUN set -x \
13
+ && mkdir -p /usr/src/python \
15
14
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
16
15
| tar -xJC /usr/src/python --strip-components=1 \
17
16
&& cd /usr/src/python \
18
- && ./configure \
17
+ && ./configure --enable-shared \
19
18
&& make -j$(nproc) \
20
19
&& make install \
21
- && cd / \
20
+ && ldconfig \
21
+ && find /usr/local \
22
+ \( -type d -a -name test -o -name tests \) \
23
+ -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
24
+ -exec rm -rf '{}' + \
22
25
&& rm -rf /usr/src/python
23
26
24
27
# make some useful symlinks that are expected to exist
You can’t perform that action at this time.
0 commit comments