Ubuntu系统安装docker以及安装yg系统所能使用到的插件
前言:建议大家使用ubuntu系统的时候,直接永久关闭防火墙目前我们处于学习状态,这样有利于提高开发效率。
项目地址:https://github.com/xzhHas/yg
文章目录
一、安装docker
-
更新现有的软件包:
sudo apt update
-
安装必要的软件包:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
-
添加Docker的官方GPG密钥:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
-
设置Docker稳定版的APT源:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
-
更新APT包索引:
sudo apt update
-
确保安装的是从Docker官方仓库而不是Ubuntu默认仓库:
apt-cache policy docker-ce
你应该能看到输出中显示了
https://download.docker.com/linux/ubuntu
字样,表示APT源已正确配置。 -
安装Docker:
sudo apt install docker-ce
-
验证Docker是否安装成功:
sudo systemctl status docker
-
给docker配置阿里云镜像加速:阿里云跳转网址
如果Docker正在运行,你会看到类似以下的输出: