Install and use docker under CentOS 6.8

Docker is an open source application container engine that can easily create a lightweight, portable, and self-sufficient container for any application. Using Linux's LXC, AUFS, Go language, and cgroup to achieve resource independence, you can easily achieve file, resource, network isolation, and its ultimate goal is to achieve application isolation similar to the PaaS platform.

Docker features worth paying attention to:

Docker is usually used in the following scenarios:

I am using CentOS6.8 here.

Note: other sources may cause the version of your kernel and docker to be inconsistent, you need to upgrade the kernel to 3.x.

installation:

1[ root@localhost ~]# rpm -ivh http://dl.Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
 2 Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
 3 warning:/var/tmp/rpm-tmp.JN76fI: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
 4 Preparing...                ########################################### [100%]51:epel-release          ########################################### [100%]6[root@localhost ~]# rpm --import/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-678[root@localhost ~]# yum -y install docker-io
 910 Start and set to start automatically
1112[ root@localhost ~]# service docker start
13 Starting cgconfig service:[determine]14 Starting docker:[determine]15[root@localhost ~]# chkconfig docker on

Get centos mirror

[ root@localhost ~]# docker pull hub.c.163.com/public/centos:6.7

The official installation method docker pull imagename is downloaded from the index center of docker, imagename is the image name, for example, docker pull Ubuntu is to download base ubuntu and the tag is latest.

Due to the slow speed of domestic access to the Docker hub directly, the time to pull the image will be longer. Generally, we will use mirror acceleration or pull directly from some domestic platform mirror warehouses.

List two commonly used ones:

NetEase Mirror Center: https://c.163.com/hub#/m/home/

daocloud mirror market: https://hub.daocloud.io/

View docker image

Run docker run shell

View container information

Stop container

[ root@localhost ~]# docker stop <CONTAINER ID>

**Delete the container (docker rm): **

docker ps -a #Get container name
docker rm container_name

Delete all containers

docker rm $(docker ps -a -q)

New to contact.

Recommended Posts

Install and use docker under CentOS 6.8
How to install and use Docker on CentOS 7
Install and configure keepalived under CentOS 5.9
Install and use dig under ubuntu/debian
Compile and install LAMP under Centos 5.2
Use Nginx and u under CentOS
CentOS7.3 install iptables and detailed use
Centos7 install Docker
Install Python3 and ansible under CentOS8
Centos7 install docker18
centos7 install docker
CentOS7 install and use SQL Server
CentOS 6 install Docker
Install Python3 and Py under CentOS7
Centos8 install Docker
Install Mono 3.2 and Jexus 5.4 under CentOS 6.3
Compile and install libmodbus library under CentOS7
Installation and use of Mysql under CentOS
Install Mono 2.10.8 and Jexus 5.0 under 32- and 64-bit CentOS 6.0
KVM installation and preliminary use under CentOS 7.2
Install Docker CE in yum under CentOS 7
Install centos7 and connect
Install mysql5.7 under CentOS7
Install ActiveMQ under Centos7
Install PostgreSQL12 under CentOS7
Install CentOS under VMware
Install mysql under Centos 7
CentOS 8-dnf install docker
Install Jenkins under Centos 7
Install MariaDB under MariaDB Centos7
Install mysql5.1 under CentOS6.5
install Docker on centos6.5
CentOS 7 install Docker CE
How to install and use Docker on Ubuntu 20.04
How to install and use Composer on CentOS 8
Install svn and configuration through yum under CentOS
How to install and use Curl on CentOS 8
How to install and use Docker on Ubuntu 16.04
Build docker environment under Centos6.5
centos7 install python3 and ipython
Know Linux and install CentOS
CentOs7.3 compile and install Nginx 1.9.9
CentOS 7 install Mono and MonoDevelop
CentOS6.5 install Java 8 and Tomcat8
Centos compile and install Git
Install Oracle11gR2 database under CentOS6.9
Install docker transfer on Centos7
Install MySQL under Linux (CentOS 7)
Centos6.5 install and configure mongodb
centos7 kvm installation and use
Install docker on Centos system
Install Java JDK8 under CentOS6
CentOS7 install OracleJDK and JRE
CentOS6 install and crack Jira 7
CentOS6.5 install Java 8 and Tomcat8
CentOS7 postgresql installation and use
Centos7 compile and install ntp-4.2.8p11
CentOS 6.9 compile and install python
CentOS6 install and crack confluence
CentOS 6 compile and install python 3
Install MongoDB database under CentOS7