Skip to content

Commit 762c765

Browse files
authored
Merge pull request #442 from J0WI/alpine11
Add Alpine 3.11
2 parents 3957597 + d6a0035 commit 762c765

File tree

14 files changed

+170
-33
lines changed

14 files changed

+170
-33
lines changed

.travis.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ matrix:
1111
env: VERSION=3.8 VARIANT=buster
1212
- os: linux
1313
env: VERSION=3.8 VARIANT=buster/slim
14+
- os: linux
15+
env: VERSION=3.8 VARIANT=alpine3.11
1416
- os: linux
1517
env: VERSION=3.8 VARIANT=alpine3.10
1618
- os: linux
@@ -22,9 +24,9 @@ matrix:
2224
- os: linux
2325
env: VERSION=3.7 VARIANT=stretch/slim
2426
- os: linux
25-
env: VERSION=3.7 VARIANT=alpine3.10
27+
env: VERSION=3.7 VARIANT=alpine3.11
2628
- os: linux
27-
env: VERSION=3.7 VARIANT=alpine3.9
29+
env: VERSION=3.7 VARIANT=alpine3.10
2830
- os: linux
2931
env: VERSION=3.6 VARIANT=buster
3032
- os: linux
@@ -34,9 +36,9 @@ matrix:
3436
- os: linux
3537
env: VERSION=3.6 VARIANT=stretch/slim
3638
- os: linux
37-
env: VERSION=3.6 VARIANT=alpine3.10
39+
env: VERSION=3.6 VARIANT=alpine3.11
3840
- os: linux
39-
env: VERSION=3.6 VARIANT=alpine3.9
41+
env: VERSION=3.6 VARIANT=alpine3.10
4042
- os: linux
4143
env: VERSION=3.5 VARIANT=buster
4244
- os: linux
@@ -46,9 +48,9 @@ matrix:
4648
- os: linux
4749
env: VERSION=3.5 VARIANT=stretch/slim
4850
- os: linux
49-
env: VERSION=3.5 VARIANT=alpine3.10
51+
env: VERSION=3.5 VARIANT=alpine3.11
5052
- os: linux
51-
env: VERSION=3.5 VARIANT=alpine3.9
53+
env: VERSION=3.5 VARIANT=alpine3.10
5254
- os: linux
5355
env: VERSION=2.7 VARIANT=buster
5456
- os: linux
@@ -58,9 +60,9 @@ matrix:
5860
- os: linux
5961
env: VERSION=2.7 VARIANT=stretch/slim
6062
- os: linux
61-
env: VERSION=2.7 VARIANT=alpine3.10
63+
env: VERSION=2.7 VARIANT=alpine3.11
6264
- os: linux
63-
env: VERSION=2.7 VARIANT=alpine3.9
65+
env: VERSION=2.7 VARIANT=alpine3.10
6466

6567
install:
6668
- git clone https://github.com/docker-library/official-images.git ~/official-images

2.7/alpine3.9/Dockerfile renamed to 2.7/alpine3.11/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.9
7+
FROM alpine:3.11
88

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

3.5/alpine3.10/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ RUN set -ex \
6060
xz-dev \
6161
zlib-dev \
6262
# add build deps before removing fetch deps in case there's overlap
63-
&& apk del .fetch-deps \
63+
&& apk del --no-network .fetch-deps \
6464
\
6565
&& cd /usr/src/python \
6666
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -120,7 +120,7 @@ RUN set -ex \
120120
| sort -u \
121121
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
122122
| xargs -rt apk add --no-cache --virtual .python-rundeps \
123-
&& apk del .build-deps \
123+
&& apk del --no-network .build-deps \
124124
\
125125
&& find /usr/local -depth \
126126
\( \

3.5/alpine3.9/Dockerfile renamed to 3.5/alpine3.11/Dockerfile

Lines changed: 3 additions & 3 deletions
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.9
7+
FROM alpine:3.11
88

99
# ensure local python is preferred over distribution python
1010
ENV PATH /usr/local/bin:$PATH
@@ -60,7 +60,7 @@ RUN set -ex \
6060
xz-dev \
6161
zlib-dev \
6262
# add build deps before removing fetch deps in case there's overlap
63-
&& apk del .fetch-deps \
63+
&& apk del --no-network .fetch-deps \
6464
\
6565
&& cd /usr/src/python \
6666
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -120,7 +120,7 @@ RUN set -ex \
120120
| sort -u \
121121
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
122122
| xargs -rt apk add --no-cache --virtual .python-rundeps \
123-
&& apk del .build-deps \
123+
&& apk del --no-network .build-deps \
124124
\
125125
&& find /usr/local -depth \
126126
\( \

3.6/alpine3.10/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ RUN set -ex \
6262
xz-dev \
6363
zlib-dev \
6464
# add build deps before removing fetch deps in case there's overlap
65-
&& apk del .fetch-deps \
65+
&& apk del --no-network .fetch-deps \
6666
\
6767
&& cd /usr/src/python \
6868
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -122,7 +122,7 @@ RUN set -ex \
122122
| sort -u \
123123
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
124124
| xargs -rt apk add --no-cache --virtual .python-rundeps \
125-
&& apk del .build-deps \
125+
&& apk del --no-network .build-deps \
126126
\
127127
&& find /usr/local -depth \
128128
\( \

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

Lines changed: 3 additions & 3 deletions
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.9
7+
FROM alpine:3.11
88

99
# ensure local python is preferred over distribution python
1010
ENV PATH /usr/local/bin:$PATH
@@ -62,7 +62,7 @@ RUN set -ex \
6262
xz-dev \
6363
zlib-dev \
6464
# add build deps before removing fetch deps in case there's overlap
65-
&& apk del .fetch-deps \
65+
&& apk del --no-network .fetch-deps \
6666
\
6767
&& cd /usr/src/python \
6868
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -122,7 +122,7 @@ RUN set -ex \
122122
| sort -u \
123123
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
124124
| xargs -rt apk add --no-cache --virtual .python-rundeps \
125-
&& apk del .build-deps \
125+
&& apk del --no-network .build-deps \
126126
\
127127
&& find /usr/local -depth \
128128
\( \

3.7/alpine3.10/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN set -ex \
6363
xz-dev \
6464
zlib-dev \
6565
# add build deps before removing fetch deps in case there's overlap
66-
&& apk del .fetch-deps \
66+
&& apk del --no-network .fetch-deps \
6767
\
6868
&& cd /usr/src/python \
6969
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -123,7 +123,7 @@ RUN set -ex \
123123
| sort -u \
124124
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
125125
| xargs -rt apk add --no-cache --virtual .python-rundeps \
126-
&& apk del .build-deps \
126+
&& apk del --no-network .build-deps \
127127
\
128128
&& find /usr/local -depth \
129129
\( \

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

Lines changed: 3 additions & 3 deletions
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.9
7+
FROM alpine:3.11
88

99
# ensure local python is preferred over distribution python
1010
ENV PATH /usr/local/bin:$PATH
@@ -63,7 +63,7 @@ RUN set -ex \
6363
xz-dev \
6464
zlib-dev \
6565
# add build deps before removing fetch deps in case there's overlap
66-
&& apk del .fetch-deps \
66+
&& apk del --no-network .fetch-deps \
6767
\
6868
&& cd /usr/src/python \
6969
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -123,7 +123,7 @@ RUN set -ex \
123123
| sort -u \
124124
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
125125
| xargs -rt apk add --no-cache --virtual .python-rundeps \
126-
&& apk del .build-deps \
126+
&& apk del --no-network .build-deps \
127127
\
128128
&& find /usr/local -depth \
129129
\( \

3.8/alpine3.10/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN set -ex \
6363
xz-dev \
6464
zlib-dev \
6565
# add build deps before removing fetch deps in case there's overlap
66-
&& apk del .fetch-deps \
66+
&& apk del --no-network .fetch-deps \
6767
\
6868
&& cd /usr/src/python \
6969
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -87,7 +87,7 @@ RUN set -ex \
8787
| sort -u \
8888
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
8989
| xargs -rt apk add --no-cache --virtual .python-rundeps \
90-
&& apk del .build-deps \
90+
&& apk del --no-network .build-deps \
9191
\
9292
&& find /usr/local -depth \
9393
\( \

3.8/alpine3.11/Dockerfile

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM alpine:3.11
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.8.1
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+
bzip2-dev \
42+
coreutils \
43+
dpkg-dev dpkg \
44+
expat-dev \
45+
findutils \
46+
gcc \
47+
gdbm-dev \
48+
libc-dev \
49+
libffi-dev \
50+
libnsl-dev \
51+
libtirpc-dev \
52+
linux-headers \
53+
make \
54+
ncurses-dev \
55+
openssl-dev \
56+
pax-utils \
57+
readline-dev \
58+
sqlite-dev \
59+
tcl-dev \
60+
tk \
61+
tk-dev \
62+
util-linux-dev \
63+
xz-dev \
64+
zlib-dev \
65+
# add build deps before removing fetch deps in case there's overlap
66+
&& apk del --no-network .fetch-deps \
67+
\
68+
&& cd /usr/src/python \
69+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
70+
&& ./configure \
71+
--build="$gnuArch" \
72+
--enable-loadable-sqlite-extensions \
73+
--enable-optimizations \
74+
--enable-option-checking=fatal \
75+
--enable-shared \
76+
--with-system-expat \
77+
--with-system-ffi \
78+
--without-ensurepip \
79+
&& make -j "$(nproc)" \
80+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
81+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
82+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
83+
&& make install \
84+
\
85+
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
86+
| tr ',' '\n' \
87+
| sort -u \
88+
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
89+
| xargs -rt apk add --no-cache --virtual .python-rundeps \
90+
&& apk del --no-network .build-deps \
91+
\
92+
&& find /usr/local -depth \
93+
\( \
94+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
95+
-o \
96+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
97+
\) -exec rm -rf '{}' + \
98+
&& rm -rf /usr/src/python \
99+
\
100+
&& python3 --version
101+
102+
# make some useful symlinks that are expected to exist
103+
RUN cd /usr/local/bin \
104+
&& ln -s idle3 idle \
105+
&& ln -s pydoc3 pydoc \
106+
&& ln -s python3 python \
107+
&& ln -s python3-config python-config
108+
109+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
110+
ENV PYTHON_PIP_VERSION 19.3.1
111+
# https://github.com/pypa/get-pip
112+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/ffe826207a010164265d9cc807978e3604d18ca0/get-pip.py
113+
ENV PYTHON_GET_PIP_SHA256 b86f36cc4345ae87bfd4f10ef6b2dbfa7a872fbff70608a1e43944d283fd0eee
114+
115+
RUN set -ex; \
116+
\
117+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
118+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
119+
\
120+
python get-pip.py \
121+
--disable-pip-version-check \
122+
--no-cache-dir \
123+
"pip==$PYTHON_PIP_VERSION" \
124+
; \
125+
pip --version; \
126+
\
127+
find /usr/local -depth \
128+
\( \
129+
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
130+
-o \
131+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
132+
\) -exec rm -rf '{}' +; \
133+
rm -f get-pip.py
134+
135+
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