Skip to content
This repository was archived by the owner on Mar 28, 2019. It is now read-only.

Commit bdd6c5a

Browse files
committed
Install tk-dev and tcl-dev before building python
* docker-library/python#127
1 parent d45ec35 commit bdd6c5a

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

2.7/Dockerfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@ ENV PYTHON_VERSION 2.7.12
1616
ENV PYTHON_PIP_VERSION 8.1.2
1717

1818
RUN set -ex \
19-
&& apk add --no-cache --virtual .fetch-deps gnupg tar \
19+
&& buildDeps=' \
20+
gnupg \
21+
tar \
22+
tcl-dev \
23+
tk-dev \
24+
' \
25+
&& runDeps=' \
26+
tcl \
27+
tk \
28+
' \
29+
&& apk add --no-cache $runDeps $buildDeps \
2030
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
2131
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
2232
&& export GNUPGHOME="$(mktemp -d)" \
@@ -41,7 +51,7 @@ RUN set -ex \
4151
-o \
4252
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
4353
\) -exec rm -rf '{}' + \
44-
&& apk del .fetch-deps \
54+
&& apk del $buildDeps \
4555
&& rm -rf /usr/src/python ~/.cache
4656

4757
CMD ["python2"]

3.5/Dockerfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@ ENV PYTHON_VERSION 3.5.2
1616
ENV PYTHON_PIP_VERSION 8.1.2
1717

1818
RUN set -ex \
19-
&& apk add --no-cache --virtual .fetch-deps gnupg tar \
19+
&& buildDeps=' \
20+
gnupg \
21+
tar \
22+
tcl-dev \
23+
tk-dev \
24+
' \
25+
&& runDeps=' \
26+
tcl \
27+
tk \
28+
' \
29+
&& apk add --no-cache $runDeps $buildDeps \
2030
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
2131
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
2232
&& export GNUPGHOME="$(mktemp -d)" \
@@ -40,7 +50,7 @@ RUN set -ex \
4050
-o \
4151
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
4252
\) -exec rm -rf '{}' + \
43-
&& apk del .fetch-deps \
53+
&& apk del $buildDeps \
4454
&& rm -rf /usr/src/python ~/.cache
4555

4656
# make some useful symlinks that are expected to exist

0 commit comments

Comments
 (0)