Skip to content

Commit ad5e9af

Browse files
committed
unoconv: improve gpg reliability
* gpg key verification occasionally fails due to network issues when attempting to fetch keys. Combat this with two approaches: * Disable ipv6 testing in dirmngr.conf. [1] * Provide a fallback list of keyservers to pull from. [2] [1] usbarmory/usbarmory-debian-base_image#9 (comment) [2] tianon/gosu#39 (comment)
1 parent 3a22868 commit ad5e9af

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

unoconv/Dockerfile

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ RUN apt-get update \
3333
&& apt-get install -y \
3434
curl \
3535
gnupg2 \
36-
&& gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
36+
&& mkdir ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf \
37+
&& for server in hkp://ipv4.pool.sks-keyservers.net:80 \
38+
hkp://ha.pool.sks-keyservers.net:80 \
39+
hkp://pgp.mit.edu:80 \
40+
hkp://keyserver.pgp.com:80 \
41+
; do \
42+
gpg --keyserver "$server" --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && break || echo "Trying new server..." \
43+
; done \
3744
&& curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
3845
&& curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
3946
&& gpg --verify /usr/local/bin/gosu.asc \
@@ -55,7 +62,13 @@ RUN apt-get update \
5562
&& apt-get install -y \
5663
curl \
5764
gnupg2 \
58-
&& gpg --keyserver pool.sks-keyservers.net --recv-keys AFEEAEA3 \
65+
&& for server in hkp://ipv4.pool.sks-keyservers.net:80 \
66+
hkp://ha.pool.sks-keyservers.net:80 \
67+
hkp://pgp.mit.edu:80 \
68+
hkp://keyserver.pgp.com:80 \
69+
; do \
70+
gpg --keyserver "$server" --recv-keys AFEEAEA3 && break || echo "Trying new server..." \
71+
; done \
5972
&& curl -SL "$LIBREOFFICE_MIRROR_URL/$LIBREOFFICE_VERSION/deb/x86_64/$LIBREOFFICE_ARCHIVE" -o $LIBREOFFICE_ARCHIVE \
6073
&& curl -SL "$LIBREOFFICE_MIRROR_URL/$LIBREOFFICE_VERSION/deb/x86_64/$LIBREOFFICE_ARCHIVE.asc" -o $LIBREOFFICE_ARCHIVE.asc \
6174
&& gpg --verify "$LIBREOFFICE_ARCHIVE.asc" \

0 commit comments

Comments
 (0)