因為最近在給服務(wù)器更換鏡像猴凹,好多軟件需要重新安裝夷狰,此處記錄備份一下
# 假如本地有舊版docker,先卸載
sudo apt-get remove docker docker-engine docker.io containerd runc
# 更新
sudo apt-get update
# 允許使用HTTPS傳輸
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
# 添加國內(nèi)鏡像源 穩(wěn)定版docker
curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
# 添加docker軟件源頭
sudo add-apt-repository \
"deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu \
$(lsb_release -cs) \
stable"
# 安裝docker
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
# 下載docker-compose 并上傳到 /usr/local/bin
# 授予權(quán)限
sudo chmod +x /usr/local/bin/docker-compose
docker-compose 下載地址:
https://github.com/docker/compose/releases/tag/v2.2.3