Docker Desktop for Windows
一. 打開 docker 的 Settings 選項時一直顯示 Loading
解決方案:
-
關閉 docker 並停止進程;
-
導航到
C:\Users\Username\AppData\Roaming\Docker
目錄並刪除(或者重命名)settings.json
文件; -
重啟 docker,然后在 Settings->General 中取消 Automatically check for updates 選項的勾選.
二. 執行 docker 的操作命令時出現 docker: Error response from daemon: Get https://registry-1.docker.io/v2/... 的錯誤
原因: docker 的默認的鏡像源是官方鏡像,拉取速度過慢導致的。建議使用阿里雲鏡像,個人感覺速度是最快的。這需要先開通阿里雲帳戶,然后在 https://cr.console.aliyun.com/undefined/instances/mirrors 中查看你的專屬加速器地址。
解決方案:對系統右下角托盤 docker 的鯨魚圖標點擊右鍵菜單選擇 Settings,打開配置窗口后左側導航菜單選擇 Docker Engine 后修改配置,如下圖,然后點擊 Apply & Restart 按鈕.
Vagrant + Virtualbox
注意:不是所有 Virtualbox 的版本都能配合 Vagrant 使用 Centos7,6.1.x 版本是不支持的。
一. Could not retrieve mirrorlist http://mirrorlist.centos.org/xxx error
[root@localhost ~]# sudo yum install -y yum-utils \ > device-mapper-persistent-data \ > lvm2 Loaded plugins: fastestmirror Determining fastest mirrors Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=vag error was 12: Timeout on http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=vag: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds') One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=<repoid> ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable <repoid> or subscription-manager repos --disable=<repoid> 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true Cannot find a valid baseurl for repo: base/7/x86_64
原因分析:網卡出現問題,導致了無法連接網絡
解決方案:
1. 查看本機網卡,命令:nmcli d
2. 查看網卡配置,命令:cd /etc/sysconfig/network-scripts
3. 按上圖修改配置文件后保存退出(注意 value 是沒有雙引號的,我遇到的錯誤就是 value 值加了雙引號導致的)
4. 重啟一下網絡服務,命令:systemctl restart network