File tree 5 files changed +119
-2
lines changed 5 files changed +119
-2
lines changed Original file line number Diff line number Diff line change
1
+ FROM debian:jessie
2
+
3
+ # remove several traces of debian python
4
+ RUN apt-get purge -y python.*
5
+
6
+ # http://bugs.python.org/issue19846
7
+ # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
8
+ ENV LANG C.UTF-8
9
+
10
+ RUN apt-get update && apt-get install -y ca-certificates libssl1.0.0 --no-install-recommends && rm -rf /var/lib/apt/lists/*
11
+
12
+ ENV PYTHON_VERSION 2.7.8
13
+
14
+ RUN set -x \
15
+ && buildDeps='curl gcc libc6-dev libssl-dev make xz-utils zlib1g-dev' \
16
+ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
17
+ && mkdir -p /usr/src/python \
18
+ && curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
19
+ | tar -xJC /usr/src/python --strip-components=1 \
20
+ && cd /usr/src/python \
21
+ && ./configure --enable-shared \
22
+ && make -j$(nproc) \
23
+ && make install \
24
+ && ldconfig \
25
+ && curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python2 \
26
+ && find /usr/local \
27
+ \( -type d -a -name test -o -name tests \) \
28
+ -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
29
+ -exec rm -rf '{}' + \
30
+ && apt-get purge -y --auto-remove $buildDeps \
31
+ && rm -rf /usr/src/python
32
+
33
+ # install "virtualenv", since the vast majority of users of this image will want it
34
+ RUN pip install virtualenv
35
+
36
+ CMD ["python2" ]
Original file line number Diff line number Diff line change
1
+ FROM debian:jessie
2
+
3
+ # remove several traces of debian python
4
+ RUN apt-get purge -y python.*
5
+
6
+ # http://bugs.python.org/issue19846
7
+ # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
8
+ ENV LANG C.UTF-8
9
+
10
+ RUN apt-get update && apt-get install -y ca-certificates libssl1.0.0 --no-install-recommends && rm -rf /var/lib/apt/lists/*
11
+
12
+ ENV PYTHON_VERSION 3.3.6
13
+
14
+ RUN set -x \
15
+ && buildDeps='curl gcc libc6-dev libssl-dev make xz-utils zlib1g-dev' \
16
+ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
17
+ && mkdir -p /usr/src/python \
18
+ && curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
19
+ | tar -xJC /usr/src/python --strip-components=1 \
20
+ && cd /usr/src/python \
21
+ && ./configure --enable-shared \
22
+ && make -j$(nproc) \
23
+ && make install \
24
+ && ldconfig \
25
+ && curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python3 \
26
+ && find /usr/local \
27
+ \( -type d -a -name test -o -name tests \) \
28
+ -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
29
+ -exec rm -rf '{}' + \
30
+ && apt-get purge -y --auto-remove $buildDeps \
31
+ && rm -rf /usr/src/python
32
+
33
+ # make some useful symlinks that are expected to exist
34
+ RUN cd /usr/local/bin \
35
+ && ln -s idle3 idle \
36
+ && ln -s pydoc3 pydoc \
37
+ && ln -s python3 python \
38
+ && ln -s python-config3 python-config
39
+
40
+ CMD ["python3" ]
Original file line number Diff line number Diff line change
1
+ FROM debian:jessie
2
+
3
+ # remove several traces of debian python
4
+ RUN apt-get purge -y python.*
5
+
6
+ # http://bugs.python.org/issue19846
7
+ # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
8
+ ENV LANG C.UTF-8
9
+
10
+ RUN apt-get update && apt-get install -y ca-certificates libssl1.0.0 --no-install-recommends && rm -rf /var/lib/apt/lists/*
11
+
12
+ ENV PYTHON_VERSION 3.4.2
13
+
14
+ RUN set -x \
15
+ && buildDeps='curl gcc libc6-dev libssl-dev make xz-utils zlib1g-dev' \
16
+ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
17
+ && mkdir -p /usr/src/python \
18
+ && curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
19
+ | tar -xJC /usr/src/python --strip-components=1 \
20
+ && cd /usr/src/python \
21
+ && ./configure --enable-shared \
22
+ && make -j$(nproc) \
23
+ && make install \
24
+ && ldconfig \
25
+ && find /usr/local \
26
+ \( -type d -a -name test -o -name tests \) \
27
+ -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
28
+ -exec rm -rf '{}' + \
29
+ && apt-get purge -y --auto-remove $buildDeps \
30
+ && rm -rf /usr/src/python
31
+
32
+ # make some useful symlinks that are expected to exist
33
+ RUN cd /usr/local/bin \
34
+ && ln -s easy_install-3.4 easy_install \
35
+ && ln -s idle3 idle \
36
+ && ln -s pip3 pip \
37
+ && ln -s pydoc3 pydoc \
38
+ && ln -s python3 python \
39
+ && ln -s python-config3 python-config
40
+
41
+ CMD ["python3" ]
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ for version in "${versions[@]}"; do
25
25
echo " $va : ${url} @${commit} $version "
26
26
done
27
27
28
- for variant in onbuild; do
28
+ for variant in onbuild slim ; do
29
29
commit=" $( git log -1 --format=' format:%H' -- " $version /$variant " ) "
30
30
echo
31
31
for va in " ${versionAliases[@]} " ; do
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ for version in "${versions[@]}"; do
15
15
fullVersion=" $( curl -sSL ' https://www.python.org/downloads/' | awk -F ' Python |</a>' ' /<span class="release-number"><a[^>]+>Python ' " $version " ' ./ { print $2 }' | sort -V | tail -1) "
16
16
(
17
17
set -x
18
- sed -ri ' s/^(ENV PYTHON_VERSION) .*/\1 ' " $fullVersion " ' /' " $version /Dockerfile"
18
+ sed -ri ' s/^(ENV PYTHON_VERSION) .*/\1 ' " $fullVersion " ' /' " $version /Dockerfile" " $version /slim/Dockerfile "
19
19
sed -ri ' s/^(FROM python):.*/\1:' " $fullVersion " ' /' " $version /onbuild/Dockerfile"
20
20
)
21
21
done
You can’t perform that action at this time.
0 commit comments