forked from docker-library/pypy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.template
47 lines (39 loc) · 1.26 KB
/
Dockerfile.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM buildpack-deps:jessie
# ensure local pypy is preferred over distribution pypy
ENV PATH /usr/local/bin:$PATH
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
# runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
tcl \
tk \
&& rm -rf /var/lib/apt/lists/*
ENV PYPY_VERSION %%PYPY_VERSION%%
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION %%PIP_VERSION%%
RUN set -ex; \
\
# this "case" statement is generated via "update.sh"
%%ARCH-CASE%%; \
\
wget -O pypy.tar.bz2 "https://bitbucket.org/pypy/pypy/downloads/%%TAR%%-v${PYPY_VERSION}-${pypyArch}.tar.bz2"; \
echo "$sha256 *pypy.tar.bz2" | sha256sum -c; \
tar -xjC /usr/local --strip-components=1 -f pypy.tar.bz2; \
find /usr/local/lib-python -depth -type d -a \( -name test -o -name tests \) -exec rm -rf '{}' +; \
rm pypy.tar.bz2; \
\
%%CMD%% --version
RUN set -ex; \
\
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
\
%%CMD%% get-pip.py \
--disable-pip-version-check \
--no-cache-dir \
"pip==$PYTHON_PIP_VERSION" \
; \
pip --version; \
\
rm -f get-pip.py
CMD ["%%CMD%%"]