Skip to content

Commit 4b499d6

Browse files
authored
Merge pull request #574 from cschramm/alpine3.13
Add alpine3.13
2 parents 903be32 + e8674e6 commit 4b499d6

File tree

7 files changed

+289
-5
lines changed

7 files changed

+289
-5
lines changed

3.10-rc/alpine3.13/Dockerfile

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

3.6/alpine3.11/Dockerfile renamed to 3.6/alpine3.13/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
66

7-
FROM alpine:3.11
7+
FROM alpine:3.13
88

99
# ensure local python is preferred over distribution python
1010
ENV PATH /usr/local/bin:$PATH

3.7/alpine3.11/Dockerfile renamed to 3.7/alpine3.13/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
66

7-
FROM alpine:3.11
7+
FROM alpine:3.13
88

99
# ensure local python is preferred over distribution python
1010
ENV PATH /usr/local/bin:$PATH

3.8/alpine3.11/Dockerfile renamed to 3.8/alpine3.13/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
66

7-
FROM alpine:3.11
7+
FROM alpine:3.13
88

99
# ensure local python is preferred over distribution python
1010
ENV PATH /usr/local/bin:$PATH

3.9/alpine3.13/Dockerfile

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

generate-stackbrew-library.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ for version in "${versions[@]}"; do
7979

8080
for v in \
8181
{buster,stretch}{,/slim} \
82-
alpine{3.12,3.11} \
82+
alpine{3.13,3.12} \
8383
windows/windowsservercore-{1809,ltsc2016} \
8484
; do
8585
dir="$version/$v"

update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ for version in "${versions[@]}"; do
132132
echo "$version: $fullVersion"
133133

134134
for v in \
135-
alpine{3.11,3.12} \
135+
alpine{3.12,3.13} \
136136
{stretch,buster}{/slim,} \
137137
windows/windowsservercore-{1809,ltsc2016} \
138138
; do

0 commit comments

Comments
 (0)