Dockerfile: Specify keyserver for gnupg auto key import

This commit is contained in:
Daniel Langbein 2021-06-17 10:37:04 +02:00
parent 7f817523b1
commit f127910308

View File

@ -26,8 +26,15 @@ USER build
WORKDIR /home/build WORKDIR /home/build
# Auto-fetch GPG keys (to check signatures): # Auto-fetch GPG keys (to check signatures):
RUN mkdir .gnupg && \ RUN install -dm0700 .gnupg && \
echo "keyserver-options auto-key-retrieve" > .gnupg/gpg.conf install -m0600 <(printf "keyserver-options auto-key-retrieve\nkeyserver hkp://keyserver.ubuntu.com\n") .gnupg/gpg.conf
#
# GnuPG key import from keys.opengpg.org does not work for all keys, see
# https://keys.openpgp.org/about/usage#gnupg-troubleshooting
# https://superuser.com/a/1485255
# It seems as if thos won't be fixed:
# https://dev.gnupg.org/T4393
# Thus we use the ubuntu keyserver instead.
COPY run.sh /home/build/run.sh COPY run.sh /home/build/run.sh
ENTRYPOINT [ "/bin/bash", "/home/build/run.sh" ] ENTRYPOINT [ "/bin/bash", "/home/build/run.sh" ]