The virtual machine used is CentOS 8.4, which simulates the server environment. It cannot connect to the external network and can only install software offline. First, download the Docker installation package from the external network machine. Download address:
You can download the corresponding version according to your needs. I downloaded 20.10.8. Unzip the file package: tar zxvf docker-20.10.8.tgz Get the docker folder and enter it, you can see the following files: In order to make the docker command executable in any location, you need to move the above files to the system executable directory, such as the /usr/bin directory; or add the current directory to the environment variable. Here, we use the first method. cp * /usr/bin/ Optionally, do not overwrite runc. At this point, you can execute the docker command. The following command can view the docker version information. Furthermore, in order to facilitate the management of docker, we need to configure the docker service. Create a docker.service file in the /etc/systemd/system directory. The content of the file is as follows: [Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network-online.target firewalld.service Wants=network-online.target [Service] Type=notify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the cgroup feature set required # for containers run by docker ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock ExecReload=/bin/kill -s HUP $MAINPID # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting. LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity # Uncomment TasksMax if your systemd version supports it. # Only systemd 226 and above support this version. #TasksMax=infinity TimeoutStartSec=0 # set delegate yes so that systemd does not reset the cgroups of docker containers Delegate=yes # kill only the docker process, not all processes in the cgroup KillMode=process # restart the docker process if it exits prematurely Restart=on-failure StartLimitBurst=3 StartLimitInterval=60s [Install] WantedBy=multi-user.target Add executable permissions to docker.service: chmod +x /etc/systemd/system/docker.service Reload the service configuration file: systemctl daemon-reload Restart Docker: systemctl restart docker Enable automatic startup: systemctl enable docker Check the docker status: systemctl status docker This is the end of this article about CentOS 8.4 offline installation of Docker. For more information about CentOS offline installation of Docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: JavaScript operation elements teach you how to change the page content style
>>: SQL ROW_NUMBER() and OVER() method case study
1. Time types are divided into: 1. Network time (...
Both methods can be used to execute a piece of ja...
Install mysql5.7.18 on CentOS6.7 1. Unzip to the ...
Table of contents Deploy nginx on server1 Deploy ...
Docker version 1.13.1 Problem Process A MySQL con...
Table of contents Preface Is there any hope after...
1. What is it? MySQL is the most popular relation...
1. First stop the mysql service As an administrat...
When you need to create an email in a shell scrip...
The user organization has two Windows Server 2008...
Two examples of the use of the a tag in HTML post...
Without further ado, here are the renderings. The...
It is really not easy to do a good reconstruction...
1. Common usage: (1) Use with % % represents a wi...
I recently made a file system and found that ther...