Skip to content

Commit 1c4831e

Browse files
committed
Add 3.5/alpine variant
1 parent 750546c commit 1c4831e

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

3.5/alpine/Dockerfile

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
FROM alpine:edge
2+
3+
RUN apk add -u --no-cache gnupg
4+
5+
# gpg: key F73C700D: public key "Larry Hastings <larry@hastings.org>" imported
6+
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
7+
8+
ENV PYTHON_VERSION 3.5.1
9+
10+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
11+
ENV PYTHON_PIP_VERSION 7.1.2
12+
13+
RUN set -x -e ;\
14+
build_deps=' \
15+
bzip2-dev \
16+
curl \
17+
gcc \
18+
libc-dev \
19+
libedit-dev \
20+
linux-headers \
21+
make \
22+
make \
23+
ncurses-dev \
24+
openssl-dev \
25+
sqlite-dev \
26+
zlib-dev \
27+
pax-utils \
28+
' \
29+
&& apk add --no-cache --virtual .build-deps $build_deps \
30+
&& mkdir -p /usr/src/ \
31+
&& curl -SL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
32+
&& curl -SL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
33+
&& gpg --verify python.tar.xz.asc \
34+
&& tar -xJC /usr/src -f python.tar.xz \
35+
&& mv /usr/src/Python-${PYTHON_VERSION} /usr/src/python \
36+
&& rm python.tar.xz* \
37+
&& cd /usr/src/python \
38+
&& ./configure --enable-shared --enable-unicode=ucs4 \
39+
&& make -j$(getconf _NPROCESSORS_ONLN) \
40+
&& make install \
41+
&& pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \
42+
&& find /usr/local \
43+
\( -type d -a -name test -o -name tests \) \
44+
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
45+
-exec rm -rf '{}' + \
46+
&& rundeps=$(scanelf -R -n --nobanner /usr/local/ \
47+
| awk '{gsub(/,/,"\n",$2); print $2}' \
48+
| sort -u | sed 's/^/so:/' | while read dep; do \
49+
apk info --installed -q $dep && echo $dep; \
50+
done | sort -u) \
51+
&& apk add --virtual .python-rundeps $rundeps \
52+
&& apk del .build-deps gnupg \
53+
&& rm -rf /usr/src/python
54+
55+
# make some useful symlinks that are expected to exist
56+
RUN cd /usr/local/bin \
57+
&& ln -s easy_install-3.5 easy_install \
58+
&& ln -s idle3 idle \
59+
&& ln -s pydoc3 pydoc \
60+
&& ln -s python3 python \
61+
&& ln -s python-config3 python-config
62+
63+
CMD ["python3"]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy