Skip to content

Commit 98ac555

Browse files
committed
Merge pull request #36 from infosiftr/moar-gpg
Add GPG verification to slim and wheezy variants too
2 parents 746b2e2 + 25134c1 commit 98ac555

File tree

7 files changed

+50
-14
lines changed

7 files changed

+50
-14
lines changed

2.7/slim/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1515

1616
ENV PYTHON_VERSION 2.7.9
1717

18+
# gpg: key 18ADD4FF: public key "Benjamin Peterson <[email protected]>" imported
19+
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
20+
1821
RUN set -x \
1922
&& buildDeps='curl gcc libc6-dev libsqlite3-dev libssl-dev make xz-utils zlib1g-dev' \
2023
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
2124
&& mkdir -p /usr/src/python \
22-
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
23-
| tar -xJC /usr/src/python --strip-components=1 \
25+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
26+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
27+
&& gpg --verify python.tar.xz.asc \
28+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
29+
&& rm python.tar.xz* \
2430
&& cd /usr/src/python \
2531
&& ./configure --enable-shared \
2632
&& make -j$(nproc) \

2.7/wheezy/Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ RUN apt-get purge -y python.*
77
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
88
ENV LANG C.UTF-8
99

10-
ENV PYTHON_VERSION 2.7.8
10+
ENV PYTHON_VERSION 2.7.9
11+
12+
# gpg: key 18ADD4FF: public key "Benjamin Peterson <[email protected]>" imported
13+
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
1114

1215
RUN set -x \
1316
&& mkdir -p /usr/src/python \
14-
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
15-
| tar -xJC /usr/src/python --strip-components=1 \
17+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
18+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
19+
&& gpg --verify python.tar.xz.asc \
20+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
21+
&& rm python.tar.xz* \
1622
&& cd /usr/src/python \
1723
&& ./configure --enable-shared \
1824
&& make -j$(nproc) \

3.3/slim/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1515

1616
ENV PYTHON_VERSION 3.3.6
1717

18+
# gpg: key 36580288: public key "Georg Brandl (Python release signing key) <[email protected]>" imported
19+
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 26DEA9D4613391EF3E25C9FF0A5B101836580288
20+
1821
RUN set -x \
1922
&& buildDeps='curl gcc libc6-dev libsqlite3-dev libssl-dev make xz-utils zlib1g-dev' \
2023
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
2124
&& mkdir -p /usr/src/python \
22-
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
23-
| tar -xJC /usr/src/python --strip-components=1 \
25+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
26+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
27+
&& gpg --verify python.tar.xz.asc \
28+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
29+
&& rm python.tar.xz* \
2430
&& cd /usr/src/python \
2531
&& ./configure --enable-shared \
2632
&& make -j$(nproc) \

3.3/wheezy/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ ENV LANG C.UTF-8
99

1010
ENV PYTHON_VERSION 3.3.6
1111

12+
# gpg: key 36580288: public key "Georg Brandl (Python release signing key) <[email protected]>" imported
13+
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 26DEA9D4613391EF3E25C9FF0A5B101836580288
14+
1215
RUN set -x \
1316
&& mkdir -p /usr/src/python \
14-
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
15-
| tar -xJC /usr/src/python --strip-components=1 \
17+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
18+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
19+
&& gpg --verify python.tar.xz.asc \
20+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
21+
&& rm python.tar.xz* \
1622
&& cd /usr/src/python \
1723
&& ./configure --enable-shared \
1824
&& make -j$(nproc) \

3.4/slim/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1515

1616
ENV PYTHON_VERSION 3.4.2
1717

18+
# gpg: key F73C700D: public key "Larry Hastings <[email protected]>" imported
19+
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
20+
1821
RUN set -x \
1922
&& buildDeps='curl gcc libc6-dev libsqlite3-dev libssl-dev make xz-utils zlib1g-dev' \
2023
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
2124
&& mkdir -p /usr/src/python \
22-
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
23-
| tar -xJC /usr/src/python --strip-components=1 \
25+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
26+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
27+
&& gpg --verify python.tar.xz.asc \
28+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
29+
&& rm python.tar.xz* \
2430
&& cd /usr/src/python \
2531
&& ./configure --enable-shared \
2632
&& make -j$(nproc) \

3.4/wheezy/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ ENV LANG C.UTF-8
99

1010
ENV PYTHON_VERSION 3.4.2
1111

12+
# gpg: key F73C700D: public key "Larry Hastings <[email protected]>" imported
13+
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 97FC712E4C024BBEA48A61ED3A5CA953F73C700D
14+
1215
RUN set -x \
1316
&& mkdir -p /usr/src/python \
14-
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
15-
| tar -xJC /usr/src/python --strip-components=1 \
17+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
18+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
19+
&& gpg --verify python.tar.xz.asc \
20+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
21+
&& rm python.tar.xz* \
1622
&& cd /usr/src/python \
1723
&& ./configure --enable-shared \
1824
&& make -j$(nproc) \

update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ for version in "${versions[@]}"; do
1515
fullVersion="$(curl -sSL 'https://www.python.org/downloads/' | awk -F 'Python |</a>' '/<span class="release-number"><a[^>]+>Python '"$version"'./ { print $2 }' | sort -V | tail -1)"
1616
(
1717
set -x
18-
sed -ri 's/^(ENV PYTHON_VERSION) .*/\1 '"$fullVersion"'/' "$version/Dockerfile" "$version/slim/Dockerfile"
18+
sed -ri 's/^(ENV PYTHON_VERSION) .*/\1 '"$fullVersion"'/' "$version"/{,slim/,wheezy/}Dockerfile
1919
sed -ri 's/^(FROM python):.*/\1:'"$fullVersion"'/' "$version/onbuild/Dockerfile"
2020
)
2121
done

0 commit comments

Comments
 (0)