Check the Current Docker Version
Before updating Docker, it’s essential to verify the currently installed version. Run the following command:
docker --version
Docker version 27.4.0, build bde2b89
Update Docker on WSL2
To update Docker on a WSL2 environment, follow these steps:
- Update the package lists to ensure you have the latest information about available packages:
sudo apt-get update
- Upgrade the Docker-related packages:
sudo apt upgrade docker-ce docker-ce-cli containerd.io
Verify the Updated Docker Version
After the update, confirm that the Docker version has been successfully upgraded:
docker --version
Docker version 27.4.1, build b9d17ea