Skip to content

Commit c24c7b5

Browse files
committed
Add 3.6/alpine3.8, 3.5/alpine3.8, and 3.4/alpine3.8
1 parent 7a79468 commit c24c7b5

File tree

5 files changed

+412
-13
lines changed

5 files changed

+412
-13
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,21 @@ env:
1010
- VERSION=3.6 VARIANT=stretch/slim
1111
- VERSION=3.6 VARIANT=jessie
1212
- VERSION=3.6 VARIANT=jessie/slim
13+
- VERSION=3.6 VARIANT=alpine3.8
1314
- VERSION=3.6 VARIANT=alpine3.7
1415
- VERSION=3.6 VARIANT=alpine3.6
1516
- VERSION=3.5 VARIANT=stretch
1617
- VERSION=3.5 VARIANT=stretch/slim
1718
- VERSION=3.5 VARIANT=jessie
1819
- VERSION=3.5 VARIANT=jessie/slim
20+
- VERSION=3.5 VARIANT=alpine3.8
1921
- VERSION=3.5 VARIANT=alpine3.7
2022
- VERSION=3.4 VARIANT=stretch
2123
- VERSION=3.4 VARIANT=stretch/slim
2224
- VERSION=3.4 VARIANT=jessie
2325
- VERSION=3.4 VARIANT=jessie/slim
2426
- VERSION=3.4 VARIANT=wheezy
27+
- VERSION=3.4 VARIANT=alpine3.8
2528
- VERSION=3.4 VARIANT=alpine3.7
2629
- VERSION=2.7 VARIANT=stretch
2730
- VERSION=2.7 VARIANT=stretch/slim

3.4/alpine3.8/Dockerfile

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM alpine:3.8
8+
9+
# ensure local python is preferred over distribution python
10+
ENV PATH /usr/local/bin:$PATH
11+
12+
# http://bugs.python.org/issue19846
13+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
14+
ENV LANG C.UTF-8
15+
16+
# install ca-certificates so that HTTPS works consistently
17+
# the other runtime dependencies for Python are installed later
18+
RUN apk add --no-cache ca-certificates
19+
20+
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
21+
ENV PYTHON_VERSION 3.4.8
22+
23+
RUN set -ex \
24+
&& apk add --no-cache --virtual .fetch-deps \
25+
gnupg \
26+
libressl \
27+
tar \
28+
xz \
29+
\
30+
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
31+
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
32+
&& export GNUPGHOME="$(mktemp -d)" \
33+
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
34+
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
35+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
36+
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
37+
&& mkdir -p /usr/src/python \
38+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
39+
&& rm python.tar.xz \
40+
\
41+
&& apk add --no-cache --virtual .build-deps \
42+
bzip2-dev \
43+
coreutils \
44+
dpkg-dev dpkg \
45+
expat-dev \
46+
findutils \
47+
gcc \
48+
gdbm-dev \
49+
libc-dev \
50+
libffi-dev \
51+
libressl \
52+
libressl-dev \
53+
linux-headers \
54+
make \
55+
ncurses-dev \
56+
pax-utils \
57+
readline-dev \
58+
sqlite-dev \
59+
tcl-dev \
60+
tk \
61+
tk-dev \
62+
xz-dev \
63+
zlib-dev \
64+
# add build deps before removing fetch deps in case there's overlap
65+
&& apk del .fetch-deps \
66+
\
67+
&& cd /usr/src/python \
68+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
69+
&& ./configure \
70+
--build="$gnuArch" \
71+
--enable-loadable-sqlite-extensions \
72+
--enable-shared \
73+
--with-system-expat \
74+
--with-system-ffi \
75+
--without-ensurepip \
76+
&& make -j "$(nproc)" \
77+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
78+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
79+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
80+
&& make install \
81+
\
82+
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
83+
| tr ',' '\n' \
84+
| sort -u \
85+
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
86+
| xargs -rt apk add --virtual .python-rundeps \
87+
&& apk del .build-deps \
88+
\
89+
&& find /usr/local -depth \
90+
\( \
91+
\( -type d -a \( -name test -o -name tests \) \) \
92+
-o \
93+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
94+
\) -exec rm -rf '{}' + \
95+
&& rm -rf /usr/src/python \
96+
\
97+
&& python3 --version
98+
99+
# make some useful symlinks that are expected to exist
100+
RUN cd /usr/local/bin \
101+
&& ln -s idle3 idle \
102+
&& ln -s pydoc3 pydoc \
103+
&& ln -s python3 python \
104+
&& ln -s python3-config python-config
105+
106+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
107+
ENV PYTHON_PIP_VERSION 10.0.1
108+
109+
RUN set -ex; \
110+
\
111+
apk add --no-cache --virtual .fetch-deps libressl; \
112+
\
113+
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
114+
\
115+
apk del .fetch-deps; \
116+
\
117+
python get-pip.py \
118+
--disable-pip-version-check \
119+
--no-cache-dir \
120+
"pip==$PYTHON_PIP_VERSION" \
121+
; \
122+
pip --version; \
123+
\
124+
find /usr/local -depth \
125+
\( \
126+
\( -type d -a \( -name test -o -name tests \) \) \
127+
-o \
128+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
129+
\) -exec rm -rf '{}' +; \
130+
rm -f get-pip.py
131+
132+
CMD ["python3"]

3.5/alpine3.8/Dockerfile

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM alpine:3.8
8+
9+
# ensure local python is preferred over distribution python
10+
ENV PATH /usr/local/bin:$PATH
11+
12+
# http://bugs.python.org/issue19846
13+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
14+
ENV LANG C.UTF-8
15+
16+
# install ca-certificates so that HTTPS works consistently
17+
# the other runtime dependencies for Python are installed later
18+
RUN apk add --no-cache ca-certificates
19+
20+
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
21+
ENV PYTHON_VERSION 3.5.5
22+
23+
RUN set -ex \
24+
&& apk add --no-cache --virtual .fetch-deps \
25+
gnupg \
26+
openssl \
27+
tar \
28+
xz \
29+
\
30+
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
31+
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
32+
&& export GNUPGHOME="$(mktemp -d)" \
33+
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
34+
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
35+
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
36+
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
37+
&& mkdir -p /usr/src/python \
38+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
39+
&& rm python.tar.xz \
40+
\
41+
&& apk add --no-cache --virtual .build-deps \
42+
bzip2-dev \
43+
coreutils \
44+
dpkg-dev dpkg \
45+
expat-dev \
46+
findutils \
47+
gcc \
48+
gdbm-dev \
49+
libc-dev \
50+
libffi-dev \
51+
openssl \
52+
openssl-dev \
53+
linux-headers \
54+
make \
55+
ncurses-dev \
56+
pax-utils \
57+
readline-dev \
58+
sqlite-dev \
59+
tcl-dev \
60+
tk \
61+
tk-dev \
62+
xz-dev \
63+
zlib-dev \
64+
# add build deps before removing fetch deps in case there's overlap
65+
&& apk del .fetch-deps \
66+
\
67+
&& cd /usr/src/python \
68+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
69+
&& ./configure \
70+
--build="$gnuArch" \
71+
--enable-loadable-sqlite-extensions \
72+
--enable-shared \
73+
--with-system-expat \
74+
--with-system-ffi \
75+
--without-ensurepip \
76+
&& make -j "$(nproc)" \
77+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
78+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
79+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
80+
&& make install \
81+
\
82+
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
83+
| tr ',' '\n' \
84+
| sort -u \
85+
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
86+
| xargs -rt apk add --virtual .python-rundeps \
87+
&& apk del .build-deps \
88+
\
89+
&& find /usr/local -depth \
90+
\( \
91+
\( -type d -a \( -name test -o -name tests \) \) \
92+
-o \
93+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
94+
\) -exec rm -rf '{}' + \
95+
&& rm -rf /usr/src/python \
96+
\
97+
&& python3 --version
98+
99+
# make some useful symlinks that are expected to exist
100+
RUN cd /usr/local/bin \
101+
&& ln -s idle3 idle \
102+
&& ln -s pydoc3 pydoc \
103+
&& ln -s python3 python \
104+
&& ln -s python3-config python-config
105+
106+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
107+
ENV PYTHON_PIP_VERSION 10.0.1
108+
109+
RUN set -ex; \
110+
\
111+
apk add --no-cache --virtual .fetch-deps openssl; \
112+
\
113+
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
114+
\
115+
apk del .fetch-deps; \
116+
\
117+
python get-pip.py \
118+
--disable-pip-version-check \
119+
--no-cache-dir \
120+
"pip==$PYTHON_PIP_VERSION" \
121+
; \
122+
pip --version; \
123+
\
124+
find /usr/local -depth \
125+
\( \
126+
\( -type d -a \( -name test -o -name tests \) \) \
127+
-o \
128+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
129+
\) -exec rm -rf '{}' +; \
130+
rm -f get-pip.py
131+
132+
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