centos7安装docker和compose
时间: 2023-04-30 19:06:33 浏览: 151
Centos7 安装docker-compose
安装Docker和Compose需要以下步骤:
1. 安装Docker:
1) 下载Docker安装包:curl -fsSL https://get.docker.com -o get-docker.sh
2) 运行安装脚本:sudo sh get-docker.sh
3) 将用户添加到docker用户组:sudo usermod -aG docker YOUR_USER
4) 启动Docker服务:sudo systemctl start docker
2. 安装Docker Compose:
1) 下载Compose安装包:sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2) 授予Compose可执行权限:sudo chmod +x /usr/local/bin/docker-compose
3) 测试安装是否成功:docker-compose --version
阅读全文