Skip to content

Commit c9872c7

Browse files
committed
removed stale template file combination; got rid of alpine 3.11 and fixed ds-alpine as base image for ds-py:v3.8
1 parent 196e7d8 commit c9872c7

File tree

5 files changed

+26
-693
lines changed

5 files changed

+26
-693
lines changed

3.8/alpine3.11/Dockerfile

-140
This file was deleted.

3.8/alpine3.12/Dockerfile

+26-27
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
#
2-
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3-
#
4-
# PLEASE DO NOT EDIT IT DIRECTLY.
5-
#
61

7-
FROM alpine:3.12
2+
FROM danielschulz/alpine:v3.12
3+
MAINTAINER Daniel Schulz <danielschulz2005@hotmail.com>
84

95
# ensure local python is preferred over distribution python
10-
ENV PATH /usr/local/bin:$PATH
6+
ENV PATH /usr/local/bin:${PATH}
117

128
# http://bugs.python.org/issue19846
139
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
@@ -18,29 +14,33 @@ RUN set -eux; \
1814
apk add --no-cache \
1915
# install ca-certificates so that HTTPS works consistently
2016
ca-certificates \
17+
# and tzdata for PEP 615 (https://www.python.org/dev/peps/pep-0615/)
18+
tzdata \
2119
;
2220
# other runtime dependencies for Python are installed later
2321

24-
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
25-
ENV PYTHON_VERSION 3.8.6
22+
# use 3.6, 3.7, 3.8, 3.9, (as of now, use "master" for 3.10)
23+
ARG CPYTHON_GIT_URI="https://github.com/danielschulz/cpython.git"
24+
ARG CPYTHON_GIT_REFERENCE="v3.8.6"
25+
ARG PYTHON_VERSION="${CPYTHON_GIT_REFERENCE}"
26+
27+
ENV PYTHON_VERSION=${PYTHON_VERSION}
2628

2729
RUN set -ex \
2830
&& apk add --no-cache --virtual .fetch-deps \
2931
gnupg \
3032
tar \
3133
xz \
34+
git \
3235
\
33-
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
34-
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
35-
&& export GNUPGHOME="$(mktemp -d)" \
36-
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
37-
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
38-
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
39-
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \
4036
&& mkdir -p /usr/src/python \
41-
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
42-
&& rm python.tar.xz \
43-
\
37+
&& time git clone \
38+
-b ${CPYTHON_GIT_REFERENCE} \
39+
--depth 1 \
40+
--single-branch \
41+
--recurse-submodules ${CPYTHON_GIT_URI} \
42+
/usr/src/python \
43+
&& rm -rf /usr/src/python/.git \
4444
&& apk add --no-cache --virtual .build-deps \
4545
bluez-dev \
4646
bzip2-dev \
@@ -73,7 +73,7 @@ RUN set -ex \
7373
&& cd /usr/src/python \
7474
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
7575
&& ./configure \
76-
--build="$gnuArch" \
76+
--build="${gnuArch}" \
7777
--enable-loadable-sqlite-extensions \
7878
--enable-optimizations \
7979
--enable-option-checking=fatal \
@@ -93,7 +93,6 @@ RUN set -ex \
9393
\( \
9494
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
9595
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \
96-
-o \( -type f -a -name 'wininst-*.exe' \) \
9796
\) -exec rm -rf '{}' + \
9897
\
9998
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
@@ -113,20 +112,20 @@ RUN cd /usr/local/bin \
113112
&& ln -s python3-config python-config
114113

115114
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
116-
ENV PYTHON_PIP_VERSION 20.3.1
115+
ENV PYTHON_PIP_VERSION 20.3.3
117116
# https://github.com/pypa/get-pip
118-
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py
119-
ENV PYTHON_GET_PIP_SHA256 d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d81b7
117+
ENV PYTHON_GET_PIP_URL https://raw.githubusercontent.com/pypa/get-pip/${PYTHON_PIP_VERSION}/get-pip.py
118+
ENV PYTHON_GET_PIP_SHA256 6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2
120119

121120
RUN set -ex; \
122121
\
123-
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
124-
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
122+
wget -q -O get-pip.py "${PYTHON_GET_PIP_URL}"; \
123+
echo "${PYTHON_GET_PIP_SHA256} *get-pip.py" | sha256sum -c -; \
125124
\
126125
python get-pip.py \
127126
--disable-pip-version-check \
128127
--no-cache-dir \
129-
"pip==$PYTHON_PIP_VERSION" \
128+
"pip==${PYTHON_PIP_VERSION}" \
130129
; \
131130
pip --version; \
132131
\

0 commit comments

Comments
 (0)