File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM cmp1234/alpine-bash
2
+
3
+ # ensure local python is preferred over distribution python
4
+ ENV PATH /usr/local/bin:$PATH
5
+
6
+ # http://bugs.python.org/issue19846
7
+ # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
8
+ ENV LANG C.UTF-8
9
+
10
+ # install ca-certificates so that HTTPS works consistently
11
+ # the other runtime dependencies for Python are installed later
12
+
13
+ ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
14
+ ENV PYTHON_VERSION 2.7.13
15
+
16
+ RUN adduser -u 18345 -D cmp \
17
+ && apk add --no-cache python2=2.7.13-r1 ca-certificates
18
+
19
+ # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
20
+ ENV PYTHON_PIP_VERSION 9.0.1
21
+
22
+ RUN set -ex; \
23
+ \
24
+ apk add --no-cache --virtual .fetch-deps libressl; \
25
+ \
26
+ wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py' ; \
27
+ \
28
+ apk del .fetch-deps; \
29
+ \
30
+ python get-pip.py \
31
+ --disable-pip-version-check \
32
+ --no-cache-dir \
33
+ "pip==$PYTHON_PIP_VERSION" \
34
+ ; \
35
+ pip --version; \
36
+ \
37
+ find /usr/local -depth \
38
+ \( \
39
+ \( -type d -a -name test -o -name tests \) \
40
+ -o \
41
+ \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
42
+ \) -exec rm -rf '{}' +; \
43
+ rm -f get-pip.py
44
+
45
+ WORKDIR /home/cmp
46
+ CMD ["python2" ]
You can’t perform that action at this time.
0 commit comments