CentOS7 installation tutorial for Docker
- 2020-05-24 06:41:32
- OfStack
Docker profile
Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable container and release them to any popular Linux machine, as well as virtualization. Containers are completely sandboxed and have no interfaces with each other. Docker USES the client-server (C/S) architectural pattern to manage and create Docker containers using remote API. The Docker container is created with an Docker image. The relationship between a container and an image is similar to that between objects and classes in object-oriented programming. Website address: http: / / www docker. com /
Docker installation
The system requires CentOS 7.X or above, kernel at least 3.10, 64-bit
1. Check the kernel version of uname and r
2, vi /etc/profile modify the agent Settings (if the agent needs to be set up). The content is as follows: ** is the password. Please avoid the @ symbol in the password.)
http_proxy=http://userName:password@10.16.236.108:3128/
ftp_proxy="http://userName:*****@10.16.236.108:3128/"
https_proxy="https://userName:*****@10.16.236.108:3128/"
export https_proxy
export http_proxy
export ftp_proxy
3. yum update upgrade the local yum package
4, tee etc/yum. repos. d/docker repo < < -'EOF' adds yum warehouse configuration (see box below for content)
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
5, yum install docker-engine install the docker package
6. service docker start start docker service
7, mkdir/etc/systemd/system/docker service. d
8, touch/etc/systemd/system/docker service. d/http - proxy. conf agent if required, add docker program agent content (see box below)
[Service] example [Service]
Environment="HTTP_PROXY=http://proxy.ip.com:80" Enviroment= " HTTP_PROXY=http:// User name: password @ Agent address: port number"
11, systemctl daemon - reload
12. systemctl restart docker (steps 11 and 12) To restart the docker operation)
13, docker run es1064en-world run the official image hello world file and verify the installation is successful.