下载离线docker安装包 [root环境下]
https://download.docker.com/linux/static/stable/x86_64/
下载最新的版本即可docker-20.10.5.tgz
解压安装
tar -xvf docker-20.10.5.tgz
cp docker-20.10.5/* /usr/bin
启动守护程序 程序执行完回车即可
nohup dockerd &
测试安装
docker run hello-world
返还结果
latest: Pulling from library/hello-world
b8dfde127a29: Pull complete
Digest: sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24
Status: Downloaded newer image for hello-world:latest
time="2021-03-17T10:50:35.901109253Z" level=info msg="starting signal loop" namespace=moby path=/run/docker/containerd/daemon/io.containerd.runtime.v2.task/moby/5cc80da4cf7e5b017fc5ea870c4a6b24bdc43cd0bd7d184afa86c5c1cfc5e075 pid=18373
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/