|
18 | 18 | ENV DEBIAN_FRONTEND=noninteractive \ |
19 | 19 | DEBCONF_NONINTERACTIVE_SEEN=true |
20 | 20 |
|
21 | | -# http://askubuntu.com/a/235911/134645 |
22 | | -# https://github.com/moby/moby/issues/20022#issuecomment-182169732 |
23 | | -# Using the (pgp.mit.edu) instead of (keyserver.ubuntu.com) due to recurrent errors in Travis. |
24 | | -RUN (apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2EA8F35793D8809A || \ |
25 | | - apt-key adv --keyserver pgp.mit.edu --recv-keys 2EA8F35793D8809A) \ |
26 | | - && apt-key update -qqy |
27 | | -RUN (apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 || \ |
28 | | - apt-key adv --keyserver pgp.mit.edu --recv-keys 40976EAF437D05B5) \ |
29 | | - && apt-key update -qqy |
30 | | -RUN (apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 || \ |
31 | | - apt-key adv --keyserver pgp.mit.edu --recv-keys 3B4FE6ACC0B21F32) \ |
32 | | - && apt-key update -qqy |
33 | | -RUN (apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A2F683C52980AECF || \ |
34 | | - apt-key adv --keyserver pgp.mit.edu --recv-keys A2F683C52980AECF) \ |
35 | | - && apt-key update -qqy |
36 | | -RUN (apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F76221572C52609D || \ |
37 | | - apt-key adv --keyserver pgp.mit.edu --recv-keys F76221572C52609D) \ |
38 | | - && apt-key update -qqy |
| 21 | +# GPG servers aren't too reliable (especially in out test builds) |
| 22 | +# so fallback servers are needed |
| 23 | +# ref: https://github.com/nodejs/docker-node/issues/340#issuecomment-321669029 |
| 24 | +# ref: http://askubuntu.com/a/235911/134645 |
| 25 | +# ref: https://github.com/moby/moby/issues/20022#issuecomment-182169732 |
| 26 | +RUN set -ex \ |
| 27 | + && for key in \ |
| 28 | + 2EA8F35793D8809A \ |
| 29 | + 40976EAF437D05B5 \ |
| 30 | + 3B4FE6ACC0B21F32 \ |
| 31 | + A2F683C52980AECF \ |
| 32 | + F76221572C52609D \ |
| 33 | + ; do \ |
| 34 | + gpg --keyserver pgp.mit.edu --recv-keys "$key" || \ |
| 35 | + gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \ |
| 36 | + gpg --keyserver keyserver.ubuntu.com --recv-keys "$key" || \ |
| 37 | + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \ |
| 38 | + done |
39 | 39 | # How to remove keys? e.g. sudo apt-key del 2EA8F35793D8809A |
40 | 40 |
|
41 | 41 | #======================== |
|
0 commit comments