部署Apollo 9.0-1 安装docker(阿里源安装)
1.更新索引
sudo apt-get update
2. 安装依赖包
sudo apt-get install \ca-certificates \curl \gnupg \lsb-release
3.添加 Docker GPG 密钥
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
4.设置docker仓库
echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
5. 更新包索引并安装 Docker
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
6.开启并验证docker是否安装
sudo systemctl start docker
sudo systemctl enable docker
sudo docker ps #查看是否有容器title相关内容输出,如有输出则docker安装成功
7.将用户加入docker组
这一步作用是在使用docker时不加sudo(后续安装Apollo必须)
sudo systemctl restart dockersudo gpasswd -a $USER dockersudo usermod -aG docker $USERsudo systemctl restart dockersudo chmod 777 /var/run/docker.sock