Install Docker
Docker is an open-source containerization platform. It enables developers to package application services into containers. Containers are standardized executable components combining application source code with the operating system (OS) libraries and dependencies required to run that code in any environment.
Install the Docker engine on all the machines on which you want to install Cyware Agent. You can download and install the latest version of the Docker engine from the Docker Website.
You can also install Docker on RedHat, CentOS, and Ubuntu operating systems.
Install Docker on RedHat and CentOS
You can install Docker on RedHat and CentOS for the installation and configuration of Cyware Agent.
To install the Docker engine on RedHat and CentOS operating systems, follow these steps:
For RedHat or CentOS-based distributions, create a
docker.repo
file in the/etc/yum.repos.d/
directory.Update the
docker.repo
file with the following configuration:For CentOS 7.x and RHEL 7.x:
[cyware-docker] name=Docker CE Stable baseurl=https://packages.cyware.com/repository/docker-yum-proxy/7/$basearch/stable enabled=1 gpgcheck=0 priority=1 [centosplus] name=CentOS-7 - Plus baseurl=https://packages.cyware.com/repository/cyware-yum-group/centos/7/centosplus/$basearch/ gpgcheck=0 enabled=1 [extras] name=CentOS-7 - Extras baseurl=https://packages.cyware.com/repository/cyware-yum-group/centos/7/extras/$basearch/ gpgcheck=0 enabled=1 [cr] name=CentOS-7 - cr baseurl=https://packages.cyware.com/repository/cyware-yum-group/centos/7/cr/$basearch/ gpgcheck=0 enabled=1 [fasttrack] name=CentOS-7 - fasttrack baseurl=https://packages.cyware.com/repository/cyware-yum-group/centos/7/fasttrack/$basearch/ gpgcheck=0 enabled=1 [os] name=CentOS-7 - fasttrack baseurl=https://packages.cyware.com/repository/cyware-yum-group/centos/7/os/$basearch/ gpgcheck=0 enabled=1
For CentOS 8.x and RHEL 8.x:
[cyware-docker] name=Docker CE Stable baseurl=https://packages.cyware.com/repository/docker-yum-proxy/linux/centos/8/$basearch/stable enabled=1 gpgcheck=0 priority=1 [centosplus] name=CentOS-8-stream - Plus baseurl=https://packages.cyware.com/repository/centos-proxy/centos/8-stream/centosplus/$basearch/os/ gpgcheck=0 enabled=1 priority=2 [extras] name=CentOS-8-stream - Extras baseurl=https://packages.cyware.com/repository/centos-proxy/centos/8-stream/extras/$basearch/os/ gpgcheck=0 enabled=1 priority=2 [cr] name=CentOS-8-stream - cr baseurl=https://packages.cyware.com/repository/centos-proxy/centos/8-stream/cr/$basearch/os/ gpgcheck=0 enabled=1 priority=2 [Appstream] name=CentOS-8-stream - Appstream baseurl=https://packages.cyware.com/repository/centos-proxy/centos/8-stream/AppStream/$basearch/os/ gpgcheck=0 enabled=1 priority=2 [BaseOS] name=CentOS-8-stream - BaseOS baseurl=https://packages.cyware.com/repository/centos-proxy/centos/8-stream/BaseOS/$basearch/os/ gpgcheck=0 enabled=1 priority=2 [PowerTools] name=CentOS-8-stream - PowerTools baseurl=https://packages.cyware.com/repository/centos-proxy/centos/8-stream/PowerTools/$basearch/os/ gpgcheck=0 enabled=1 priority=2
For CentOS 9.x and RHEL 9.x:
[cyware-docker] name=Docker CE Stable baseurl=https://packages.cyware.com/repository/docker-yum-proxy/linux/centos/9/$basearch/stable enabled=1 gpgcheck=0 priority=1 [Appstream] name=CentOS-9-stream - Appstream baseurl=https://packages.cyware.com/repository/centos-9-proxy/AppStream/$basearch/os/ gpgcheck=0 enabled=1 priority=2 [BaseOS] name=CentOS-9-stream - BaseOS baseurl=https://packages.cyware.com/repository/centos-9-proxy/BaseOS/$basearch/os/ gpgcheck=0 enabled=1 priority=3
Your repository is now ready for use.
If the yum package manager is available in the on-premise environment, then run the following command:
sudo yum install --enablerepo=cyware-docker docker-ce
OR
If the dnf package manager is available in the on-premise environment, then run the following command:
sudo dnf install --enablerepo=cyware-docker docker-ce
Note
If you encounter an error
Cannot retrieve repository metadata for repository <repository_name>. Please verify its path and try again
, then ensure that the value of$releasesearch
(package version) and$basesearch
(base architecture) in thedocker.repo
file is correctly identified by the package manager. The expected value of$releasesearch
is either 7 or 8 and the value of$basesearch
is x86_64.To start the Docker service, run the following commands:
sudo systemctl enable docker sudo systemctl start docker sudo chmod 777 /var/run/docker.sock
If a proxy is required to access Cyware domains, then add the following variables to the docker.service file:
[Service] Environment="HTTP_PROXY=http://proxy.example.com:80" Environment="HTTPS_PROXY=http://proxy.example.com:80" Environment="NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,.corp"
Note
The default location of docker.service file is /usr/lib/systemd/system/docker.service.
You can run the following command to retrieve the custom path of docker.service file:
systemctl status docker
Install Docker on Ubuntu
You can install Docker on Ubuntu for the installation and configuration of Cyware Agent.
To install Docker on Ubuntu, follow these steps:
Run the following command to add the Cyware repository to the apt-get source list.
echo \ "deb [arch=$(dpkg --print-architecture) trusted=yes] https://packages.cyware.com/repository/apt-docker-proxy/ \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Run the following command to update the
apt
package index.sudo apt-get update
Run the following command to install Docker Engine, containerd, and Docker Compose.
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
To start the Docker service, run the following commands:
sudo systemctl enable docker sudo systemctl start docker sudo chmod 777 /var/run/docker.sock
If a proxy is required to access Cyware domains, then add the following variables to the docker.service file:
[Service] Environment="HTTP_PROXY=http://proxy.example.com:80" Environment="HTTPS_PROXY=http://proxy.example.com:80" Environment="NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,.corp"
Note
The default location of docker.service file is /usr/lib/systemd/system/docker.service.
You can run the following command to retrieve the custom path of docker.service file:
systemctl status docker