Alpine image apk update fetch hangs

At apk –no-cache upgrade or RUN apk update no respone

Try to login docker container run command line:

  
wget http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz  

Get status is “stalled”.

PS:Error is different “no respone” or “hang”

Way one:

Answer:

apk fetch hangs
https://github.com/gliderlabs/docker-alpine/issues/307

10G mtu or switch mtu

So

Into directory

  
docker build --network host .  

Way two:

Answer:

https://mlohr.com/docker-mtu/
https://medium.com/@sylwit/how-we-spent-a-full-day-figuring-out-a-mtu-issue-with-docker-4d81fdfe2caf

  
nano /etc/docker/daemon.json  
  
{  
  "mtu": 1450  
}