# Update the apt package index and install necessary dependencies
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
# Add Docker's official GPG key
curl -fsSL https:
# Add Docker's stable repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# Update the apt package index again after adding the repository
sudo apt update
# Install Docker
sudo apt install docker-ce
# Check Docker version
docker --version