Skip to content

Commit ece154e

Browse files
committed
Update to Alpine 3.12
1 parent f83ecbf commit ece154e

File tree

7 files changed

+144
-7
lines changed

7 files changed

+144
-7
lines changed

3.5/alpine3.10/Dockerfile renamed to 3.5/alpine3.12/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.10
7+
FROM alpine:3.12
88

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

3.6/alpine3.10/Dockerfile renamed to 3.6/alpine3.12/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.10
7+
FROM alpine:3.12
88

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

3.7/alpine3.10/Dockerfile renamed to 3.7/alpine3.12/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.10
7+
FROM alpine:3.12
88

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

3.8/alpine3.10/Dockerfile renamed to 3.8/alpine3.12/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.10
7+
FROM alpine:3.12
88

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

3.9-rc/alpine3.12/Dockerfile

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

generate-stackbrew-library.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defaultDebianSuite='buster' # TODO buster
1010
declare -A debianSuites=(
1111
#[3.8-rc]='buster'
1212
)
13-
defaultAlpineVersion='3.11'
13+
defaultAlpineVersion='3.12'
1414

1515
self="$(basename "$BASH_SOURCE")"
1616
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
@@ -79,7 +79,7 @@ for version in "${versions[@]}"; do
7979

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

update.sh

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

116116
for v in \
117-
alpine{3.10,3.11} \
117+
alpine{3.11,3.12} \
118118
{stretch,buster}{/slim,} \
119119
windows/windowsservercore-{1809,ltsc2016} \
120120
; do

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