CentOS 6 install Docker

Install EPEL

Two ways

Direct installation:

yum install epel-release

You can also replace 清华源

Install via link:

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

See Official Instructions

Update dependent software###

sudo yum update -y

Install Docker

Add user group

Add a docker group

groupadd docker

Add users who use docker to the group

useradd docker -g docker

Add current users to the group

sudo usermod -aG docker $USER

Install Docker

For systems above CentOS7, you can use curl -sSL https://get.docker.com/ | sh to directly point to the installation script, here is to install with yum.

sudo yum -y install docker-io

Execute docker version to check whether the installation is successful:

Client version:1.7.1
Client API version:1.19
Go version(client): go1.4.2
Git commit(client): 786b29d/1.7.1
OS/Arch(client): linux/amd64
Get http:///var/run/docker.sock/v1.19/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

Docker Server has not been started yet, so there is a prompt at the end.

Mirror acceleration##

At present, there are several mature image acceleration in China. Here is an example of DockerCn:

CentOS6 achieves image acceleration by editing the other_args parameter of the /etc/sysconfig/docker file.

# /etc/sysconfig/docker
#
# Other arguments to pass to the docker daemon process
# These will be parsed by the sysv initscript and appended
# to the arguments list passed to docker -d

other_args="--registry-mirror=https://registry.docker-cn.com"
DOCKER_CERT_PATH=/etc/docker

# Resolves: rhbz#1176302(docker issue #407)
DOCKER_NOWARN_KERNEL_VERSION=1

# Location used for temporary files, such as those created by
# # docker load and build operations. Default is /var/lib/docker/tmp
# # Can be overriden by setting the following environment variable.
# # DOCKER_TMPDIR=/var/tmp

This example only applies to CentOS6, if the service has already been started, the service service docker restart needs to be restarted.

Docker China official image acceleration

Start service##

Start the Docker service

service docker start

Attached to stop and restart the service

service docker stop
service docker restart

Check the installation##

Execute docker version

Client version:1.7.1
Client API version:1.19
Go version(client): go1.4.2
Git commit(client): 786b29d/1.7.1
OS/Arch(client): linux/amd64
Server version:1.7.1
Server API version:1.19
Go version(server): go1.4.2
# /etc/sysconfig/docker
Git commit(server): 786b29d/1.7.1
OS/Arch(server): linux/amd64

Execute docker info

Containers:0
Images:0
Storage Driver: devicemapper
 Pool Name: docker-202:2-1172437-pool
 Pool Blocksize:65.54 kB
 Backing Filesystem: extfs
 Data file:/dev/loop0
 Metadata file:/dev/loop1
 Data Space Used:305.7 MB
 Data Space Total:107.4 GB
 Data Space Available:34.62 GB
 Metadata Space Used:733.2 kB
 Metadata Space Total:2.147 GB
 Metadata Space Available:2.147 GB
 Udev Sync Supported:true
 Deferred Removal Enabled:false
 Data loop file:/var/lib/docker/devicemapper/devicemapper/data
 Metadata loop file:/var/lib/docker/devicemapper/devicemapper/metadata
 Library Version:1.02.117-RHEL6(2016-12-13)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version:2.6.32-358.el6.x86_64
Operating System:<unknown>
CPUs:8
Total Memory:15.55 GiB
Name: ecs-634b-0002
ID: IMEI:V37Q:FO5S:3GYL:X2UH:2ECU:V4RW:---------------------------

At this point, the installation is complete!

Recommended Posts

CentOS 7 install Docker
CentOS7 install Docker
Centos7 install Docker
centos7 install docker
CentOS 6 install Docker
Centos8 install Docker
Install Docker on Centos7
CentOS 7 install Docker service
CentOS 8-dnf install docker
install Docker on centos6.5
CentOS 7 install Docker CE
1.5 Install Centos7
Install docker transfer on Centos7
Install docker on Centos system
Centos6 install Python2.7.13
Centos7.3 install nginx
CentOS7.2 install Mysql5.7.13
CentOS install Redmine
Centos7 install Python 3.6.
CentOS7 install MySQL
Centos7 install protobuf
CentOS7 install GlusterFS
ubuntu18.04 install docker
CentOS 7.4 install Zabbix 3.4
CentOS install Python 3.6
Vmware install CentOS6
centos7 install docker-ce 18.01.0
CentOS 7.2 install MariaDB
CentOS 7 install Hadoop 3.0.0
Install MySql with Docker in CentOS7
Centos7 install Python2.7
Centos 7.6 install seleniu
Centos7 install LAMP+PHPmyadmin
CentOS install mysql
Docker installation (CentOS7 installation)
CentOS install openjdk 1.8
CentOS install PHP
Container study notes CentOS7 install Docker
CentOS6 install mist.io
CentOS7 install mysql
centOs install rabbitMQ
CentOS 7 install MySQL 5.6
Install and use docker under CentOS 6.8
docker install ubuntu
Centos7 install Nginx
CentOS6.5 install CDH5.13
Install Centos7 operating system in Docker
Centos install Python3
CentOS install jdk
centos7 install nginx-rtmp
CentOS8 install MySQL8.0
Centos6.3 install KVM
CentOS install PostgreSQL 9.1
CentOS7 install mysql8
CentOS7 docker installation
CentOS 7 install Java 1.8
CentOS 7 install Gitlab
CentOS7 install MySQL8
CentOS 7 install Java 1.8
centos 6.5 install zabbix 4.4
CentOS6.8 install python2.7