Skip to content

Commit 88d10f0

Browse files
committed
Fetch PyPy using wget and install fetch deps using variable
* Most of the rest of docker-library/python#139
1 parent 0af29ac commit 88d10f0

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

2/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ ENV PYPY_VERSION 5.4.0
1212
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
1313
ENV PYTHON_PIP_VERSION 8.1.2
1414

15-
RUN set -x \
16-
&& curl -SL "https://bitbucket.org/pypy/pypy/downloads/pypy2-v${PYPY_VERSION}-linux64.tar.bz2" \
15+
RUN set -ex \
16+
&& wget -O- "https://bitbucket.org/pypy/pypy/downloads/pypy2-v${PYPY_VERSION}-linux64.tar.bz2" \
1717
| tar -xjC /usr/local --strip-components=1 \
1818
\
1919
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \

2/slim/Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@ ENV PYPY_VERSION 5.4.0
1818
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
1919
ENV PYTHON_PIP_VERSION 8.1.2
2020

21-
RUN set -x \
22-
&& apt-get update && apt-get install -y bzip2 curl --no-install-recommends && rm -rf /var/lib/apt/lists/* \
23-
&& curl -SL "https://bitbucket.org/pypy/pypy/downloads/pypy2-v${PYPY_VERSION}-linux64.tar.bz2" \
21+
RUN set -ex \
22+
&& fetchDeps=' \
23+
bzip2 \
24+
wget \
25+
' \
26+
&& apt-get update && apt-get install -y $fetchDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
27+
\
28+
&& wget -O- "https://bitbucket.org/pypy/pypy/downloads/pypy2-v${PYPY_VERSION}-linux64.tar.bz2" \
2429
| tar -xjC /usr/local --strip-components=1 \
2530
\
2631
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
@@ -34,7 +39,7 @@ RUN set -x \
3439
# https://github.com/docker-library/python/pull/100
3540
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
3641
\
37-
&& apt-get purge -y --auto-remove bzip2 curl \
42+
&& apt-get purge -y --auto-remove $fetchDeps \
3843
&& rm -rf ~/.cache
3944

4045
CMD ["pypy"]

3/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ ENV PYPY_VERSION 5.2.0-alpha1
1212
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
1313
ENV PYTHON_PIP_VERSION 8.1.2
1414

15-
RUN set -x \
16-
&& curl -SL "https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v${PYPY_VERSION}-linux64.tar.bz2" \
15+
RUN set -ex \
16+
&& wget -O- "https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v${PYPY_VERSION}-linux64.tar.bz2" \
1717
| tar -xjC /usr/local --strip-components=1 \
1818
\
1919
# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere

3/slim/Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@ ENV PYPY_VERSION 5.2.0-alpha1
1818
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
1919
ENV PYTHON_PIP_VERSION 8.1.2
2020

21-
RUN set -x \
22-
&& apt-get update && apt-get install -y bzip2 curl wget --no-install-recommends && rm -rf /var/lib/apt/lists/* \
23-
&& curl -SL "https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v${PYPY_VERSION}-linux64.tar.bz2" \
21+
RUN set -ex \
22+
&& fetchDeps=' \
23+
bzip2 \
24+
wget \
25+
' \
26+
&& apt-get update && apt-get install -y $fetchDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
27+
\
28+
&& wget -O- "https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v${PYPY_VERSION}-linux64.tar.bz2" \
2429
| tar -xjC /usr/local --strip-components=1 \
2530
\
2631
# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere
@@ -37,7 +42,7 @@ RUN set -x \
3742
# https://github.com/docker-library/python/pull/100
3843
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
3944
\
40-
&& apt-get purge -y --auto-remove bzip2 curl wget \
45+
&& apt-get purge -y --auto-remove $fetchDeps \
4146
&& rm -rf ~/.cache
4247

4348
CMD ["pypy3"]

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