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
  • 3
  • 1
    The source https://download.docker.com/linux/debian supports only Debian; you can quickly see that by opening the link in your provided paste; where you'll note no support for mantic or any Ubuntu release. https://download.docker.com/linux/ubuntu/ contains the Ubuntu support (which if you look has support for mantic). – guiverc Dec 26 '23 at 03:41
  • @guiverc This is my ubuntu image from GCP ubuntu-minimal-2310-mantic-amd64-v20231030 – jackson Dec 26 '23 at 05:40
  • My comment relates to you adding a source https://download.docker.com/linux/debian which is INVALID for a Ubuntu system, being valid only for DEBIAN... Your issue is as per the duplicate; you added an incorrect source; it needs to be removed & the correct source (provided in my prior comment) added in its place. Ubuntu images do not include 3rd party sources which that one is. – guiverc Dec 26 '23 at 06:03
  • @guiverc The linked Q/A need to be updated. It doesn't answer the question. – GAD3R Dec 26 '23 at 13:28
  • Then read the official documentation here https://help.ubuntu.com/community/Repositories/Ubuntu, you've added a source that is not for Ubuntu and doesn't support your release; that was the mistake; you need to reverse the steps you used to add that non-Ubuntu source to your system. The answer is in the duplicate in my opinion; you just need to adjust it for the source you added over the examples in that question. – guiverc Dec 26 '23 at 20:21

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,507
-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.