Skip to content

Commit 5fd6bac

Browse files
committed
Add gpg verification for python3 versions
1 parent 2296bdc commit 5fd6bac

File tree

3 files changed

+43
-5
lines changed

3 files changed

+43
-5
lines changed

2.7/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ RUN gpg --keyserver pool.sks-keyservers.net --recv-keys \
2222
C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF \
2323
CBC547978A3964D14B9AB36A6AF053F07D9DC8D2 \
2424
DBBF2EEBF925FAADCF1F3FFFD9866941EA5BBD71 \
25-
7123BC13ED9D77D5
2625
#Short version of the key, due to the fact that HKP keyservers do not support v3 fingerprints
26+
7123BC13ED9D77D5
2727

2828
RUN set -x \
2929
&& mkdir -p /usr/src/python \

3.3/Dockerfile

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

1010
ENV PYTHON_VERSION 3.3.6
1111

12+
#Keys from https://www.python.org/downloads/
13+
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys \
14+
0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D \
15+
12EF3DC38047DA382D18A5B999CDEA9DA4135B38 \
16+
26DEA9D4613391EF3E25C9FF0A5B101836580288 \
17+
2BA0DB82515BBB9EFFAC71C5C9BE28DEE6DF025C \
18+
531F072D39700991925FED0C0EDDC5F26A45C816 \
19+
8417157EDBE73D9EAC1E539B126EB563A74B06BF \
20+
97FC712E4C024BBEA48A61ED3A5CA953F73C700D \
21+
C9B104B3DD3AA72D7CCB1066FB9921286F5E1540 \
22+
C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF \
23+
CBC547978A3964D14B9AB36A6AF053F07D9DC8D2 \
24+
DBBF2EEBF925FAADCF1F3FFFD9866941EA5BBD71 \
25+
#Short version of the key, due to the fact that HKP keyservers do not support v3 fingerprints
26+
7123BC13ED9D77D5
27+
1228
RUN set -x \
1329
&& 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 \
30+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o "Python-$PYTHON_VERSION.tar.xz" \
31+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o "Python-$PYTHON_VERSION.tar.xz.asc" \
32+
&& gpg --verify "Python-$PYTHON_VERSION.tar.xz.asc" \
33+
&& tar -xJC /usr/src/python --strip-components=1 -f "Python-$PYTHON_VERSION.tar.xz" \
34+
&& rm "Python-$PYTHON_VERSION.tar.xz"* \
1635
&& cd /usr/src/python \
1736
&& ./configure --enable-shared \
1837
&& make -j$(nproc) \

3.4/Dockerfile

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

1010
ENV PYTHON_VERSION 3.4.2
1111

12+
#Keys from https://www.python.org/downloads/
13+
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys \
14+
0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D \
15+
12EF3DC38047DA382D18A5B999CDEA9DA4135B38 \
16+
26DEA9D4613391EF3E25C9FF0A5B101836580288 \
17+
2BA0DB82515BBB9EFFAC71C5C9BE28DEE6DF025C \
18+
531F072D39700991925FED0C0EDDC5F26A45C816 \
19+
8417157EDBE73D9EAC1E539B126EB563A74B06BF \
20+
97FC712E4C024BBEA48A61ED3A5CA953F73C700D \
21+
C9B104B3DD3AA72D7CCB1066FB9921286F5E1540 \
22+
C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF \
23+
CBC547978A3964D14B9AB36A6AF053F07D9DC8D2 \
24+
DBBF2EEBF925FAADCF1F3FFFD9866941EA5BBD71 \
25+
#Short version of the key, due to the fact that HKP keyservers do not support v3 fingerprints
26+
7123BC13ED9D77D5
27+
1228
RUN set -x \
1329
&& 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 \
30+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o "Python-$PYTHON_VERSION.tar.xz" \
31+
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o "Python-$PYTHON_VERSION.tar.xz.asc" \
32+
&& gpg --verify "Python-$PYTHON_VERSION.tar.xz.asc" \
33+
&& tar -xJC /usr/src/python --strip-components=1 -f "Python-$PYTHON_VERSION.tar.xz" \
34+
&& rm "Python-$PYTHON_VERSION.tar.xz"* \
1635
&& cd /usr/src/python \
1736
&& ./configure --enable-shared \
1837
&& make -j$(nproc) \

0 commit comments

Comments
 (0)