How to install docker without Internet access
First, you must have a network to download the necessary files, and then install it offline.
1. Go to https://download.docker.com/linux/static/stable/ (or change stable to edge or test), select your hardware platform, and then download the .tgz and the files you want to install Docker CE version related files.
2. If you want to modify the /etc/docker/daemon.json file, such as the image source (it will be useless if the host is not connected to the network) or the private warehouse (it needs to be in the same LAN as the host, otherwise it will be useless)
Then modify it first and then install it
tar xzvf /path/to/<FILE>.tar.gz sudo cp docker/* /usr/bin/ sudo dockerd & docker info
3. If the installation process fails,
删除/var/run/docer文件夹 删除/var/lib/docker文件夹 删除/var/run/docker.pid文件 删除/var/run/docker.sock文件 ps -aux | grep docker 停止docker相关进程 netstat -nplt | grep docker 解除docker相关进程占用端口 重新执行上述步骤
For more related tutorials, please pay attention to the PHP Chinese websitedocker tutorial column.
The above is the detailed content of How to install docker when unable to access the Internet. For more information, please follow other related articles on the PHP Chinese website!