Skip to content

Commit c43ed83

Browse files
committed
alpine: Run fetch and gpg verify into same build step
1 parent 1c4831e commit c43ed83

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

3.5/alpine/Dockerfile

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,36 @@
1-
FROM alpine:edge
2-
3-
RUN apk add -u --no-cache gnupg
4-
5-
# gpg: key F73C700D: public key "Larry Hastings <larry@hastings.org>" imported
6-
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
1+
FROM alpine:3.3
72

83
ENV PYTHON_VERSION 3.5.1
94

105
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
116
ENV PYTHON_PIP_VERSION 7.1.2
127

13-
RUN set -x -e ;\
14-
build_deps=' \
8+
# gpg: key F73C700D: public key "Larry Hastings <larry@hastings.org>" imported
9+
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
10+
11+
RUN apk add --no-cache --virtual .fetch-deps curl gnupg \
12+
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $GPG_KEY \
13+
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
14+
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
15+
&& gpg --verify python.tar.xz.asc \
16+
&& mkdir -p /usr/src/ \
17+
&& tar -xJC /usr/src -f python.tar.xz \
18+
&& mv /usr/src/Python-${PYTHON_VERSION} /usr/src/python \
19+
&& rm python.tar.xz* \
20+
&& apk del .fetch-deps
21+
22+
RUN apk add --no-cache --virtual .build-deps \
1523
bzip2-dev \
16-
curl \
1724
gcc \
1825
libc-dev \
1926
libedit-dev \
2027
linux-headers \
2128
make \
22-
make \
2329
ncurses-dev \
2430
openssl-dev \
2531
sqlite-dev \
2632
zlib-dev \
2733
pax-utils \
28-
' \
29-
&& apk add --no-cache --virtual .build-deps $build_deps \
30-
&& mkdir -p /usr/src/ \
31-
&& curl -SL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
32-
&& curl -SL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
33-
&& gpg --verify python.tar.xz.asc \
34-
&& tar -xJC /usr/src -f python.tar.xz \
35-
&& mv /usr/src/Python-${PYTHON_VERSION} /usr/src/python \
36-
&& rm python.tar.xz* \
3734
&& cd /usr/src/python \
3835
&& ./configure --enable-shared --enable-unicode=ucs4 \
3936
&& make -j$(getconf _NPROCESSORS_ONLN) \

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