OpenCloud os 9上面安装docker docker-compose脚本

发布时间:2023年12月18日
#!/bin/bash
#opencloudOs上面安装docker docker-compose环境
curl -o /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sed -i s/\$releasever/8/g  /etc/yum.repos.d/docker-ce.repo 
wget  https://vault.centos.org/centos/8/AppStream/x86_64/os/Packages/container-selinux-2.124.0-1.gitf958d0c.module_el8.3.0+569+1bada2e4.noarch.rpm
rpm -ivh  container-selinux-2.124.0-1.gitf958d0c.module_el8.3.0+569+1bada2e4.noarch.rpm
dnf install docker-ce-20.10.7 docker-ce-cli-20.10.7 -y
systemctl start docker
systemctl enable docker

#1、在线下载比较慢,也可以直接上传文件到/usr/local/bin/,然后添加文件执行权限
#curl -L "https://github.com/docker/compose/releases/download/v2.23.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
#chmod +x /usr/local/bin/docker-compose

#1、在线下载比较慢,也可以直接上传文件到/usr/local/bin/,然后添加文件执行权限
#curl -L “https://github.com/docker/compose/releases/download/v2.23.3/docker-compose- ( u n a m e ? s ) ? (uname -s)- (uname?s)?(uname -m)” -o /usr/local/bin/docker-compose
#chmod +x /usr/local/bin/docker-compose

文章来源:https://blog.csdn.net/qq_21006731/article/details/134968450
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。