6.查看docker版本
[root@docker-hub ~]# docker -vDocker version 29.0.2, build 8108357
[root@docker-hub ~]#
[root@docker-hub ~]#
[root@docker-hub ~]# docker version
Client: Docker Engine - Community
Version: 29.0.2
API version: 1.52
Go version: go1.25.4
Git commit: 8108357
Built: Mon Nov 17 12:36:49 2025
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 29.0.2
API version: 1.52 (minimum version 1.44)
Go version: go1.25.4
Git commit: e9ff10b
Built: Mon Nov 17 12:33:39 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v2.1.5
GitCommit: fcd43222d6b07379a4be9786bda52438f0dd16a1
runc:
Version: 1.3.3
GitCommit: v1.3.3-0-gd842d771
docker-init:
Version: 0.19.0
GitCommit: de40ad0
[root@docker-hub ~]#
7.验证DOCKER能用
[root@docker-hub ~]# docker run hello-world
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