1. 安装curl
apt-get update
apt upgrade
apt install curl
2.安装:
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
3. 验证:
docker -v
4. 安装docker-compose :
# 下载
curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
5.设置权限:
chmod +x /usr/local/bin/docker-compose
6.设置软连接
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
7.验证:
docker-compose version