I am getting this message on building a Debian:stretch-slim Docker image with Python 3.7.7:
gpg: keyserver receive failed: Cannot assign requested address
The command '/bin/sh -c set -ex [...]'
[...] returned a non-zero code: 2
I think it's a GPG or a networking issue.
Any tips? Your assistance is highly appreciated.
Following the recommendation from Laurent Sittler, the solution was on adding options to the gpg servers.
Find this line in the Dockerfile:
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
and replace it with this block:
&& ( \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
|| gpg --batch --keyserver pgp.mit.edu --recv-keys "$GPG_KEY" \
|| gpg --batch --keyserver keyserver.pgp.com --recv-keys "$GPG_KEY" \
) \
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With