Install Docker and Docker Swarm on CentOS7

This tutorial will show you how to install Docker and Docker Swarm on CentOS7. This tutorial is for Docker Version 1.11 and I use Vagrant and VirtualBox to create CentOS 7 in Virtual Machine.

Stop worrying about what you have to loose and start focusing on what you have to gain

Stop worrying about what you have to loose and start focusing on what you have to gain

Create a Vagrantfile for CentOS7

Turn on your Virtual Machine with command:

After finishing creating CentOS server, you access the server via SSH by command:

Docker

Go to root account:

In the next step, we will install Docker Engine following the official tutorial of Docker.

Add Docker Repository  into CentOS

Running the installation

Start Docker Service

Enable Docker run on OS Start

Docker Swarm

Installing Docker Swarm via Docker Pull

Open Docker Service Configuration file

In the line contains ExecStart, we add text as below

And now, reload Docker Service

Now we can run Swarm Node

And running Swarm Manage

Finally, verify your work

Video

Thanks for your reading!!!

  • Khoi Thinh

    Cái file gravant kia tạo như nào vậy bạn? Dùng vi để tạo hay là tải ở đâu vè? Với cả chắc cũng phải cần install vagrant chứ nhỉ? Bạn hướng dẫn chi tiết chút đc ko chứ tutorial như này khó follow lắm, Thanks bạn nha. Video youtube hd 720 nhưng nhòe quá mình ko nhìn thấy rõ.