Instead of cuDNN 5, try cuDNN 7 image as base from here:
8.0-cudnn7-runtime-ubuntu16.04
Also make sure your DNS / Firewall are not misbehaving.  I had similar errors when using secure / open DNS servers.