Docker shell lag problems on coffee shop wifi

If your Docker shell starts being slow suddenly and you’re in a coffee shop…

chances are that you’re on their wifi, such as The Cloud here in the UK & it is trying to resolve a DNS entry that doesn’t exist.

Run:

sudo tcpdump -A -s0 -nni en0 port 53

then run your Docker command again & the tcpdump output will probably show:

[snip].........localunixsocket.thecloud.co.uk...[snip]

appearing in the output. It’ll be trying to resolve this route & won’t be able to:

▶ dig localunixsocket.thecloud.co.uk

; <<>> DiG 9.8.3-P1 <<>> localunixsocket.thecloud.co.uk
;; global options: +cmd
;; connection timed out; no servers could be reached

If this is the case, then you need to add:

127.0.0.1 localunixsocket.thecloud.co.uk

to /etc/hosts.

Thanks to @jewilmeer on GitHub for the hint.

Like what you read? Give DynamicMonkeys a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.