mirror of https://github.com/helloxz/shell.git
xiaoz
4 years ago
1 changed files with 26 additions and 0 deletions
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash |
||||
##### CentOS 7安装Docker ##### |
||||
|
||||
cd |
||||
mkdir temp |
||||
cd temp |
||||
|
||||
#下载 |
||||
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.3.9-3.1.el7.x86_64.rpm |
||||
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-19.03.9-3.el7.x86_64.rpm |
||||
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-cli-19.03.9-3.el7.x86_64.rpm |
||||
|
||||
#安装 |
||||
yum -y install containerd.io-1.3.9-3.1.el7.x86_64.rpm |
||||
yum -y install docker-ce-19.03.9-3.el7.x86_64.rpm |
||||
yum -y install docker-ce-cli-19.03.9-3.el7.x86_64.rpm |
||||
|
||||
#启动docker |
||||
systemctl start docker |
||||
#开机启动 |
||||
systemctl enable docker |
||||
|
||||
echo '----------------------------------------' |
||||
|
||||
#运行一个hello word |
||||
docker run hello-world |
Loading…
Reference in new issue