docs icon indicating copy to clipboard operation
docs copied to clipboard

Trouble adding the Docker repo to my apt on Ubuntu 20.04

Open kailyisme opened this issue 2 years ago • 2 comments

File: engine/install/ubuntu.md

Under Install using the repository, under Set up the repository, under step 3 where it asks to run echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null it does not work for me on Ubuntu LTS 20.04 giving issues that the public key you issue for this repo is not provided. Err:3 https://download.docker.com/linux/ubuntu focal InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8 Hit:11 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease Reading package lists... Done W: GPG error: https://download.docker.com/linux/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8 E: The repository 'https://download.docker.com/linux/ubuntu focal InRelease' is not signed. 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.

I would suggest that people maybe use instead add-apt-repository command like sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" though i don't know how to get the arch to be dynamic on that line

kailyisme avatar Apr 28 '22 10:04 kailyisme

@kailyisme I had similar problem on Debian 11.

Here my issue including fix - maybe its same on ubuntu?

https://github.com/docker/docker.github.io/issues/15727

cschaba avatar Sep 23 '22 11:09 cschaba

@kailyisme i followed @cschaba lead in his issue (but kept references to ubuntu, not debian), replaced the steps to

Add Docker’s official GPG key:

sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg

Use the following command to set up the repository:

echo
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/docker.gpg] https://download.docker.com/linux/ubuntu
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

this solved it for me, standard ubuntu on azure

thesutex avatar Oct 04 '22 14:10 thesutex

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

docker-robott avatar Jan 03 '23 01:01 docker-robott

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked

docker-robott avatar Feb 16 '23 03:02 docker-robott