To work with virtualisation technology, various platforms are used in the OS, which allow to run independent systems, utilities, applications due to isolation of processes and environment at the level of both processor and kernel. Such a solution has become evolutionary and is used actively in the production of various information systems. One of the options for implementing such technology is Docker, the installation of which we will consider in this instruction.
Quick installation of Docker on CentOS!
One of the three options for installing the Docker platform on CentOS, is in a pre-prepared script from the company itself. It will write the repositories and download the key for EDS, then install the necessary software via the package manager.
Let's update the packages and install the necessary dependencies, for this purpose execute the command:
yum update && dnf install curl nano -y
After downloading and granting rights to work with the script, then run it as root:
curl -fsSL https://get.docker.com -o install.sh && chmod 700 install.sh &&\
bash ./install.sh
As a result, the only thing left to do is to start the Docker platform management daemon itself via the provisioning system:
service docker start && service docker status
As a result, the containerisation platform is deployed on the machine and ready for use!
Installation via repository
All steps in the tutorial can be performed on powerful cloud servers. Serverspace provides isolated VPS / VDS servers for common and virtualize usage.
It will take some time to deploy server capacity. After that you can connect in any of the convenient ways!
For most cases, combat information systems may require a specific version of Docker or manually need to track system performance. For the purpose of more flexible configuration we can use the platform repositories! Let's go to the configuration directory of the package manager and create a file:
cd /etc/yum.repos.d/ && nano docker-ce.repo
Inside of which you need to write a configuration, with a specific syntax:
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/centos/$releasever/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg
Each of the above options has its own functionality, the main ones are:
- baseurl specifies a link to the repository from which packages will be synchronised and installed;
- enabled function, which indicates the state of the repository. Whether to include it in the search list or not;
- gpgcheck checks the EDS of downloaded packages to determine their authenticity and integrity from the moment of transmission;
- gpgkey the path to the used key in URL path format. To control existing keys on your system, you can also download it, check the hash sum and specify the path to the file via file:///.
After that we can save the file with Ctrl+O and proceed to install the packages:
yum install docker-ce docker-ce-cli contained.io
As you can see in the screenshot above, the docker-ce-stable repository we mentioned was used to install these packages, then all that's left to do is start the daemon and get started!
service docker start