The docker version
command is used to display the version information of the Docker client and server components installed on your system. It provides details about the Docker Engine version, API version, and other relevant information.
To use the docker version
command, you can follow these steps:
-
Make sure you have Docker installed and running on your system.
-
Open a terminal or command prompt.
-
Run the
docker version
command:docker version
This will display the version information of the Docker client and server components.
-
The output of the
docker version
command includes several sections:- Client: This section provides information about the Docker client, including the version number, API version, and Git commit.
- Server: This section provides information about the Docker server (Docker Engine), including the version number, API version, and Git commit.
- Server Engine: This section provides additional details about the Docker server, such as the storage driver, logging driver, and other configuration settings.
The output may also include other sections depending on the version of Docker and the specific configuration of your system.
-
You can use the
docker version
command with additional options to display more detailed or specific information. For example, you can use the--format
option to specify a custom format for the output:docker version --format '{{.Server.Version}}'
This command will display only the version number of the Docker server.
Please note that the docker version
command provides information about the Docker client and server components installed on your system. It does not provide information about individual containers or images. For container-specific information, you can use commands like docker ps
or docker inspect
.