How to Check Docker Version in Linux, Windows, Mac and Ubuntu

In this guide, we'll cover how to check your Docker version across multiple platforms: Linux, Windows, macOS, and Ubuntu.

1. Linux & Ubuntu 

For both general Linux distributions and Ubuntu, the command remains the same. Open your terminal and type:
docker --version
This command provides a quick overview, showing the Docker version along with the build number.

For more detailed information, you can use:
docker version
This will display both the client and server versions, which can be useful if you're running Docker in a more complex environment, like with a remote Docker daemon.

2. Windows 

For Windows users, Docker typically runs via Docker Desktop, but the command-line approach remains similar.

Using Command Prompt or PowerShell

Open Command Prompt or PowerShell and enter:
docker --version
For detailed version information:

docker version

Using Docker Desktop 

If you have Docker Desktop installed: 
  • Open Docker Desktop. 
  • Click on the gear/settings icon. 
  • Navigate to the "About Docker" section. Here, you'll see detailed version information.

3. Mac 

On macOS, Docker runs through Docker Desktop, but like Windows, the command-line methods are the same. 

Using Terminal

Launch the Terminal and type:

docker --version
For detailed version information:

docker version

Using Docker Desktop

If you're using Docker Desktop: 
  • Launch Docker Desktop. 
  • Click on the whale icon in the menu bar, then select "Preferences". 
  • Navigate to the "About Docker" section. Here, you'll find the version information.

Tips for All Platforms

Using the --format Flag

If you only want specific details, you can use the --format flag with the docker version command. For instance, to get only the client's version, use:
docker version --format '{{.Client.Version}}'

Docker Compose

If you're using Docker Compose and wish to check its version, the command is:
docker-compose --version


Checking your Docker version is a straightforward process across all platforms. Whether you're using the command-line or GUI methods, regularly checking your Docker version ensures that you're updated with the latest features and security patches. 

Remember always to check the Docker documentation if new updates or methods become available, ensuring you're using the best practices.