Wednesday, July 19, 2017

Google Faucet Docker Tests Failing to Clone

The Google Faucet Docker tests weren't running on my corporate network. I was getting a "connection timed out" issue when cloning OpenFlow. Looks like my corporate network blocks "git clone git:xxx".

Cloning into 'openflow'...
fatal: read error: Connection timed out
The command '/bin/sh -c git clone -b 2.2.2 https://github.com/mininet/mininet &&   apt-get update &&   mininet/util/install.sh -nfv &&   apt-get purge -qy pylint &&   GOPATH=~/go go get -u github.com/openconfig/gnmi/cmd/gnmi_cli' returned a non-zero code: 128

I modified the Dockerfile.tests to workaround the issue to replace git with https.

diff --git a/Dockerfile.tests b/Dockerfile.tests
index 3d09ee0..b2de2f8 100644
--- a/Dockerfile.tests
+++ b/Dockerfile.tests
@@ -34,6 +34,7 @@ RUN \
 RUN \
   git clone -b 2.2.2 https://github.com/mininet/mininet && \
   apt-get update && \
+  sed -i 's/git clone git:\/\/github.com/git clone https:\/\/github.com/g' mininet/util/install.sh && \
   mininet/util/install.sh -nfv && \
   apt-get purge -qy pylint && \
   GOPATH=~/go go get -u github.com/openconfig/gnmi/cmd/gnmi_cli

And now it is running!

Step 7/7 : CMD /faucet-src/docker/runtests.sh
 ---> Running in de27778a62e4
 ---> 13c61c5b8a02
Removing intermediate container de27778a62e4
Successfully built 13c61c5b8a02

No comments:

Post a Comment