Change your distribution name to xenial in your .list files. Update ca-certificates and check your system date/time. Old Repositories
Sometimes old repository entries from apt.dockerproject.org (the old Docker repo) conflict with the new download.docker.com address. Remove old Docker source files: sudo rm /etc/apt/sources.list.d/docker.list Use code with caution. Clean the apt cache: sudo apt-get clean sudo apt-get update Use code with caution. Source: GitHub Moby Issues Summary Checklist Re-add the Docker GPG key to /etc/apt/keyrings/ . Wrong Codename
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu xenial stable Use code with caution. Source: Docker Forums 3. Check System Certificates and Time Change your distribution name to xenial in your
: Check /etc/apt/sources.list or any file in /etc/apt/sources.list.d/ (often named docker.list ).
: Run sudo apt-get install --reinstall ca-certificates . Remove old Docker source files: sudo rm /etc/apt/sources
If you are using a derivative like Linux Mint 18 (which is based on Ubuntu 16.04 Xenial), your system might try to use its own codename (e.g., serena ) in the URL, which Docker does not recognize.
: Ensure the line looks exactly like this, manually replacing any non-Ubuntu codenames with xenial : serena ) in the URL
sudo mkdir -p /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg Use code with caution. Source: Official Docker Documentation 2. Correct the Repository Distribution Name