通常这样就可以了...现在docker安装到ubuntu 18.04失败
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
sudo add-apt-repository \
> "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
> $(lsb_release -cs) \
> stable"
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Get:2 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]
Hit:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:6 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [7889 B]
Err:6 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages
File has unexpected size (9051 != 7889). Mirror sync in progress? [IP: 99.86.58.71 443]
Hashes of expected file:
- Filesize:7889 [weak]
- SHA512:db24e63e6f882530d40047cda5c5cb43a9fd6936d518162135b59f315d9cf0e189453bddd8ee67ed0ef622012da02ecfd5f4e3419cfd116835651b37e4b6a7aa
- SHA256:fed3e5b48da23965790e21466523ae19c1afe34f31e9005ac343e6b6a4c36d63
- SHA1:f22380168007fac2e32b2d882a5120a288ed89e1 [weak]
- MD5Sum:d35d55f528a96c383f4f3c1280cdd214 [weak]
Release file created at: Sat, 17 Aug 2019 05:05:01 +0000
Fetched 64.4 kB in 0s (136 kB/s)
Reading package lists... Done
E: Failed to fetch https://download.docker.com/linux/ubuntu/dists/bionic/stable/binary-amd64/Packages.bz2 File has unexpected size (9051 != 7889). Mirror sync in progress? [IP: 99.86.58.71 443]
Hashes of expected file:
- Filesize:7889 [weak]
- SHA512:db24e63e6f882530d40047cda5c5cb43a9fd6936d518162135b59f315d9cf0e189453bddd8ee67ed0ef622012da02ecfd5f4e3419cfd116835651b37e4b6a7aa
- SHA256:fed3e5b48da23965790e21466523ae19c1afe34f31e9005ac343e6b6a4c36d63
- SHA1:f22380168007fac2e32b2d882a5120a288ed89e1 [weak]
- MD5Sum:d35d55f528a96c383f4f3c1280cdd214 [weak]
Release file created at: Sat, 17 Aug 2019 05:05:01 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.
使用来自的指令https://docs.docker.com/v17.09/engine/installation/linux/docker-ce/ubuntu/#set-up-the-repository
使用时出现同样的错误
curl -fsSL https://get.docker.com/ | sh
答案1
显然 Docker 的工作人员正在处理此事
https://github.com/docker/for-linux/issues/830#issuecomment-543930808