0

I'm installing Docker in a GCP Compute Engine VM, but I have some obstacles.

This is my first time doing this, can anyone help.

fdtigermaster@fdtigermaster-dev-gcp-test:~$ sudo apt-get update

Hit:1 http://us-central1.gce.archive.ubuntu.com/ubuntu mantic InRelease
Hit:2 http://us-central1.gce.archive.ubuntu.com/ubuntu mantic-updates InRelease
Hit:3 http://us-central1.gce.archive.ubuntu.com/ubuntu mantic-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu mantic-security InRelease
Ign:5 https://download.docker.com/linux/debian mantic InRelease
Hit:6 https://download.docker.com/linux/ubuntu mantic InRelease
Err:7 https://download.docker.com/linux/debian mantic Release
404 Not Found [IP: 13.226.22.98 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/debian mantic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

And I also tried:

sudo sed -i 's/debian/ubuntu/g' /etc/apt/sources.list.d/docker.list
sudo sed -i 's|docker.com/linux/debian|docker.com/linux/ubuntu|g' /etc/apt/sources.list
Martin Thornton
  • 5,996
  • 12
  • 32
  • 43

2 Answers2

0

Check your /ect/apt/sources.list and the files under /etc/apt/sources.list.d dir then remove any related docker's sources.

Follow the official documentation : Set up Docker's apt repository.:

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
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

Add the repository to Apt sources:

echo
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update

GAD3R
  • 3,748
-1

Open a terminal an backup your repositories list.
cd /etc/apt
sudo nano sources.list just so you can see what's in there.
sudo cp sources.list sources.list.backup
Then reset using this method
sudo apt-get install ppa-purge
and report back.