Skip to content

Commit

Permalink
Retrying (elastic#98) didn't work, so let's try different servers (el…
Browse files Browse the repository at this point in the history
  • Loading branch information
beniwohli committed Nov 13, 2017
1 parent 8381ab7 commit 36cd071
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ FROM ${PYTHON_IMAGE}
RUN apt-get update && apt-get -y --no-install-recommends install ca-certificates curl python-virtualenv &&\
rm -rf /var/lib/apt/lists/*

# connection to ha.pool.sks-keyservers.net fails sometimes, so let's retry a couple times
RUN for i in $(seq 1 5); do gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && s=0 && break || s=$? && sleep 5; done; (exit $s)
# connection to ha.pool.sks-keyservers.net fails sometimes, so let's retry with couple different servers
RUN for server in $(shuf -e ha.pool.sks-keyservers.net \
hkp://p80.pool.sks-keyservers.net:80 \
keyserver.ubuntu.com \
hkp://keyserver.ubuntu.com:80 \
pgp.mit.edu) ; do gpg --keyserver "$server" --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && s=0 && break || s=$?; done; (exit $s)

RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.10/gosu-$(dpkg --print-architecture)" \
&& curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.10/gosu-$(dpkg --print-architecture).asc" \
Expand Down
8 changes: 6 additions & 2 deletions tests/DockerfileDocs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ RUN apt-get update && \
apt-get install -y xsltproc ca-certificates libxml2-utils build-essential git curl python2.7 && \
rm -rf /var/lib/apt/lists/*

# connection to ha.pool.sks-keyservers.net fails sometimes, so let's retry a couple times
RUN for i in $(seq 1 5); do gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && s=0 && break || s=$? && sleep 5; done; (exit $s)
# connection to ha.pool.sks-keyservers.net fails sometimes, so let's retry with couple different servers
RUN for server in $(shuf -e ha.pool.sks-keyservers.net \
hkp://p80.pool.sks-keyservers.net:80 \
keyserver.ubuntu.com \
hkp://keyserver.ubuntu.com:80 \
pgp.mit.edu) ; do echo "Trying $server"; gpg --keyserver "$server" --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && s=0 && break || s=$?; done; (exit $s)

RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.10/gosu-$(dpkg --print-architecture)" \
&& curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.10/gosu-$(dpkg --print-architecture).asc" \
Expand Down

0 comments on commit 36cd071

Please sign in to comment.