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,如需转载请自行联系原作者
相关文章
|
7天前
|
时序数据库 Docker 容器
Docker安装InfluxDB
Docker安装InfluxDB
10 0
|
7天前
|
关系型数据库 MySQL 数据库
Docker安装MySQL
Docker安装MySQL
14 1
|
10天前
|
关系型数据库 MySQL 数据库
docker自定义安装mysql 5.7
docker自定义安装mysql 5.7
19 0
|
10天前
|
存储 Linux Shell
centos 部署docker容器 安装 、基本使用方法(一)
centos 部署docker容器 安装 、基本使用方法(一)
19 0
|
13天前
|
Ubuntu 网络安全 数据安全/隐私保护
ubuntu篇-配置FTP服务,本机和docker安装
通过以上步骤,你可以在Ubuntu上配置FTP服务,无论是本机安装还是Docker内安装,都可以提供FTP文件传输服务。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
20 1
|
21天前
|
Linux Shell 开发工具
CentOS8中Docker安装及部署
CentOS8中Docker安装及部署
67 0
|
21天前
|
数据安全/隐私保护 Docker 容器
AWVS13破解docker一键安装
AWVS13破解docker一键安装
30 0
|
22天前
|
NoSQL 关系型数据库 MySQL
安装Docker&镜像容器操作&使用Docker安装部署MySQL,Redis,RabbitMQ,Nacos,Seata,Minio
安装Docker&镜像容器操作&使用Docker安装部署MySQL,Redis,RabbitMQ,Nacos,Seata,Minio
101 1
|
22天前
|
弹性计算 Serverless 数据库
ECS安装问题之docker安装如何解决
ECS(Elastic Compute Service,弹性计算服务)是云计算服务提供商提供的一种基础云服务,允许用户在云端获取和配置虚拟服务器。以下是ECS服务使用中的一些常见问题及其解答的合集:
|
29天前
|
关系型数据库 分布式数据库 PolarDB
PolarDB常见问题之安装gms时出现docker如何解决
PolarDB是阿里云推出的下一代关系型数据库,具有高性能、高可用性和弹性伸缩能力,适用于大规模数据处理场景。本汇总囊括了PolarDB使用中用户可能遭遇的一系列常见问题及解答,旨在为数据库管理员和开发者提供全面的问题指导,确保数据库平稳运行和优化使用体验。