Setting up Boot
[Root@localhost ~]# Systemctl enable Docker
Created symlink from/etc/systemd/system/multi-user.target.wants/ Docker.service To/usr/lib/systemd/system/docker.service.
And then
[root@localhost ~] #shutdown-R now reboot
[Root@localhost ~]# systemctl status Docker see if the status is started
--------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------
Here is the reference URL
[Root@localhost ~]# uname-r
3.10.0-327.10.1.el7.x86_64
Update Kernel: If the production machine must be careful to update the kernel to avoid unnecessary problems.
sudo yum update
Install Docker
[root@localhost ~]# Curl-ssl https://get.docker.com/| SH
+ sh-c ' sleep 3; yum-y-Q install docker-engine ' Delta RPMs disabled because/usr/bin/applydeltarpm not
Insta lled.
Warning:/var/cache/yum/x86_64/7/docker-main-repo/packages/docker-engine-selinux-1.10.3-1.el7.centos.noarch.rpm : Header V4 rsa/sha512 Signature, key ID 2c52609d:nokey public
key for Docker-engine-selinux-1.10.3-1.el7.centos.noa RCH.RPM is isn't installed
importing GPG key 0x2c52609d:
Userid : "Docker release Tool (Releasedocker) <dock Er@docker.com> "
fingerprint:5811 8e89 f3a9 1289 7c07 0adb f762 2157 2c52 609d
from : HTTPS://YUM.DOCKERPR OJECT.ORG/GPG
Setsebool: SELinux is disabled.
If you are would like Docker as a non-root user, your should now consider adding your
user to the "Docker" group WI Th something like:
sudo usermod-ag docker your-user Remember so you'll have to log out and then
To take effect!
Start Docker
[root@localhost ~]# sudo service docker start
redirecting To/bin/systemctl start Docker.service
Test
[Root@localhost ~]# sudo docker run Hello-world unable to find image ' hello-world:latest ' locally latest:pulling from Lib Rary/hello-world 03f4658f8b78:pull Complete A3ed95caeb02:pull complete digest:sha256 : 8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7 status:downloaded Newer image for Hello-world:
Latest Hello from Docker.
This message shows the your installation appears to be working correctly.
To generate this message, Docker took the following Steps:1 Docker client contacted the Docker.
2. The Docker daemon pulled the "Hello-world" image from the Docker Hub. 3. The Docker daemon created a new container from this image which runs the executable that produces the output for you AR
e currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run a Ubuntu container with: $ docker run-it Ubuntu bash Share images, automa Te workflows, and MorE with a free Docker Hub account:https://hub.docker.com for more examples and ideas, visit:https://docs.docker.com/us erguide/
Setting up Boot
[Root@localhost ~]# Systemctl enable Docker
Created symlink from/etc/systemd/system/multi-user.target.wants/ Docker.service To/usr/lib/systemd/system/docker.service.
To add a specified user to a user group
Usermod-ag Docker your_username
Exit, and then log back in to allow permissions to take effect.