Docker CE 全自动安装

操作系统

1
2
3
4
[root@localhost ~] # cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 
[root@localhost ~] # uname -r
3.10.0-514.el7.x86_64


安装代码如下所示:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
#2018-2-26 15:34:05
#auto install docker-ce on CentOS 7
#by author dengaosky
######################
#Uninstall old versions
yum remove -y docker docker-common docker-selinux docker-engine
#Install using the repository
yum  install  -y yum-utils device-mapper-persistent-data lvm2
##yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum-config-manager --add-repo https: //mirrors .aliyun.com /docker-ce/linux/centos/docker-ce .repo
#Disable the edge and test repositories
yum-config-manager --disable docker-ce-edge
yum-config-manager --disable docker-ce- test
#INSTALL DOCKER CE
yum  install  docker-ce -y
#Config docker
cat  > /etc/docker/daemon .json <<EOF
{ "registry-mirrors" : [ "http://df98fb04.m.daocloud.io" ]}
EOF
#Disable Firewalld,Install and Enable iptables
systemctl disable firewalld;systemctl stop firewalld
yum  install  iptables-services -y
systemctl  enable  iptables;systemctl restart iptables
#Disable Selinux
setenforce 0
sed  -i  '/SELINUX/s/enforcing/disabled/g'  /etc/selinux/config
#Start Docker
systemctl start docker
systemctl  enable  docker


Docker版本信息:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[root@localhost ~] # docker info
Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
Images: 0
Server Version: 17.12.0-ce
Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type:  true
  Native Overlay Diff:  false
Logging Driver: json- file
Cgroup Driver: cgroupfs
Plugins:
  Volume:  local
  Network: bridge host macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json- file  logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
  seccomp
   Profile: default
Kernel Version: 3.10.0-514.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.938GiB
Name: localhost.localdomain
ID: WMF3:D2KK:5ODB:LAS3:MJKI:QMLJ:H2H7:2BWN:6EMW:J7CS:2YIZ:Z4HW
Docker Root Dir:  /var/lib/docker
Debug Mode (client):  false
Debug Mode (server):  false
Registry: https: //index .docker.io /v1/
Labels:
Experimental:  false
Insecure Registries:
  127.0.0.0 /8
Live Restore Enabled:  false
 
[root@localhost ~] #



本文转自 dengaosky 51CTO博客,原文链接:http://blog.51cto.com/dengaosky/2073347,如需转载请自行联系原作者
优秀的个人博客,低调大师

微信关注我们

原文链接:https://yq.aliyun.com/articles/517834

转载内容版权归作者及来源网站所有!

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

相关文章

发表评论

资源下载

更多资源
优质分享Android(本站安卓app)

优质分享Android(本站安卓app)

近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。

Oracle Database,又名Oracle RDBMS

Oracle Database,又名Oracle RDBMS

Oracle Database,又名Oracle RDBMS,或简称Oracle。是甲骨文公司的一款关系数据库管理系统。它是在数据库领域一直处于领先地位的产品。可以说Oracle数据库系统是目前世界上流行的关系数据库管理系统,系统可移植性好、使用方便、功能强,适用于各类大、中、小、微机环境。它是一种高效率、可靠性好的、适应高吞吐量的数据库方案。

Eclipse(集成开发环境)

Eclipse(集成开发环境)

Eclipse 是一个开放源代码的、基于Java的可扩展开发平台。就其本身而言,它只是一个框架和一组服务,用于通过插件组件构建开发环境。幸运的是,Eclipse 附带了一个标准的插件集,包括Java开发工具(Java Development Kit,JDK)。

Java Development Kit(Java开发工具)

Java Development Kit(Java开发工具)

JDK是 Java 语言的软件开发工具包,主要用于移动设备、嵌入式设备上的java应用程序。JDK是整个java开发的核心,它包含了JAVA的运行环境(JVM+Java系统类库)和JAVA工具。