Docker安装
使用官方安装脚本自动安装
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
#docker启动
systemctl start docker
#重启docker服务
systemctl restart docker
#关闭docker
systemctl stop docker
#查看是否启动成功
docker ps -a
docker compose安装
1.安装 Docker Compose 可以通过下面命令自动下载适应版本的 Compose,并为安装脚本添加执行权限
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
2.查看安装是否成功
docker-compose -v