Ubuntu 18.04,安装docker
默认运行docker命令,显示没有安装,提示sudo apt install docker.io
但是运行命令后报错。
E: Unable to locate package docker.io
E: Couldn’t find any package by glob ‘docker.io’
E: Couldn’t find any package by regex ‘docker.io’
应该是ubuntu官方的源没有设置docker的repository。
参考论坛文档:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable”
然后执行:sudo apt install docker.io
成功了。
ubuntu@ip-192-168-101-13:~$ docker –version
Docker version 19.03.6, build 369ce74a3c
CSDN上有中文说明,是需要让ubuntu访问到docker的仓库。
https://blog.csdn.net/eason_1221/article/details/103091046?depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-2&utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-2
暂无评论