Centos7 docker installation details

View kernel and operating system version
[ root@prod3 ~]# uname -r
3.10.0- 327. el7.x86_64
[ root@prod3 ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511
1、 Install yum source
yum install -y epel-release
2、 yum install docker
yum install docker -y
3、 Start docker and set it to start on boot
systemctl start docker.service
systemctl enable docker.service
After installing docker, there will be an extra intranet ip segment (used by docker container)
[ root@prod3 ~]# ip addr
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether 02:42:e6:44:58:df brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 scope global docker0
valid_lft forever preferred_lft forever
4、 Find centos mirror
docker search centos
[ root@prod1 ~]# docker search centos
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker.io docker.io/centos The official build of CentOS. 3184 [OK]

5、 Download mirror
docker search centos
[ root@prod3 ~]# docker pull centos
Using default tag: latest
Trying to pull repository docker.io/library/centos ...
latest: Pulling from docker.io/library/centos
785 fe1d06b2d: Pull complete
Digest: sha256:be5b4a93f116a57ab3fd454ada72421eac892a3a4925627ac9a44f65fcd69cf8
6、 Check out the good mirror
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/centos latest 98d35105a391 28 hours ago 192.5 MB
7、 Run a container
docker run -it 98d35105a391 /bin/bash

Common commands
1、 docker info summary information
2、 docker images view image
3、 docker ps -a container status view
4、 docker pull centos (custom) download image
5、 docker search centos (custom) to find the mirror
6、 docker run starts the container
Case docker run --name some-nginx -p 80:80 -v /some/content:/usr/share/nginx/html -d nginx

Recommended Posts

Centos7 docker installation details
Docker installation (CentOS7 installation)
CentOS7 docker installation
Zabbix 2.2.20 installation details (Centos6.9)
Docker CentOS installation method
CentOS 6.8 virtual machine installation details
CentOS environment installation of Docker
2019-07-09 CentOS7 installation
centos7_1708 installation
Docker EE installation on centos7
Centos5 installation guide
CentOS 7 install Docker
CentOS7 install Docker
ubuntu 1804 installation details
Python - centos6 installation
Centos7 install Docker
Centos7 install docker18
centos7 install docker
CentOS 6 install Docker
Centos8 install Docker
CentOS container installation in Docker uses MySQL
CentOS online installation RabbitMQ3.7
Install Docker on Centos7
CentOS 7 install Docker service
Centos source installation Python3
lamp (centos7) installation lamp environment
Centos7 mqtt cluster installation
CentOS 8.0 installs docker error
Graphical installation of CentOS8
Mysql8.0.15 installation configuration (centos7)
Linux notes (1): CentOS-7 installation
CentOS 8-dnf install docker
Redis3 installation under Centos7
install Docker on centos6.5
CentOS online installation RabbitMQ3.7
CentOS 7 install Docker CE
Build docker environment under Centos6.5
Centos 7 mini installation process record
Centos mysql installation and configuration
Redis cluster installation under CentOS
Centos7 installation and configuration prometheus
CentOS 7 Galera Cluster installation guide
CentOS 7 installation and configuration PPTP
CentOS 6.x installation mysql5.7 record
Install docker transfer on Centos7
CentOS installation and configuration cmake
Graphical centos installation detailed process
Centos7.5 installation and configuration MongoDB4.0.4
Redis cluster installation under CentOS
CentOS 7 installation and configuration PPTP
Hyper-V + CentOS7 installation video tutorial
centos7 kvm installation and use
Install docker on Centos system
Centos7 silent installation of Oracle11g
CentOS7 postgresql installation and use
Centos7 installation tomcat process introduction
Discourse CentOS 8 new installation manual
CentOS8 Linux 8.0.1905 installation process (illustration)
Centos7 elk7.1.1 installation and use
Centos7 installation and configuration of Jenkins
Analysis of Hyper-V installation CentOS 8 problem