Skip to content

Commit daad8bc

Browse files
committed
2018-02-02 补充 docker 安装脚本
1 parent 2eb07d7 commit daad8bc

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
3+
echo "安装 docker 所需环境"
4+
5+
yum install -y yum-utils device-mapper-persistent-data lvm2
6+
7+
echo "添加 repo(可能网络会很慢,有时候会报:Timeout,所以要多试几次)"
8+
9+
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
10+
yum makecache fast
11+
12+
echo "开始安装 docker"
13+
14+
yum install -y docker-ce
15+
16+
echo "启动 Docker"
17+
18+
systemctl start docker.service
19+
20+
echo "安装结束"
21+
22+
echo "运行 hello world 镜像"
23+
24+
docker run hello-world

0 commit comments

Comments
 (0)