GPG errors when running apt-get update

I was following the guide to get Docker Engine installed.

I follow the guide as instructed,I do sudo apt-get update and I get the error:

root@raspberrypi:~# sudo apt-get update
E: Conflicting values set for option Signed-By regarding source https://download.docker.com/linux/debian/ buster: /etc/apt/keyrings/docker.gpg !=
E: The list of sources could not be read.

I then followed the instructions “Receiving a GPG error when running apt-get update ?” to fix the problem. The problem still persists after following those instructions.

OS: Raspbian GNU/Linux 10 (buster)

App version: Not sure.

Steps to reproduce: Follow this guide

GPG (GNU Privacy Guard) errors when running apt-get update in a Docker container may occur if the GPG keys used to verify the packages are not available on the system. This can happen if the keys have expired or if the package repository has been modified.

To fix GPG errors when running apt-get update in a Docker container, you can try the following steps:

  1. Refresh the package repository by running the following command:
    $ apt-get update
    This will update the package index files with the latest package information from the repository.

  2. If the error persists, you can try adding the GPG key manually using the apt-key command. For example:
    $ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEY_ID

Replace KEY_ID with the ID of the GPG key you want to add. You can find the key ID in the error message or by searching online for the key.

  1. If the issue is still not resolved, you may need to update the package repository configuration file to point to a different package repository. You can do this by editing the /etc/apt/sources.list file and replacing the current repository URL with a different one.
  2. If none of the above steps work, you may need to troubleshoot the issue further by examining the logs or consulting online resources for more information. It could be that the package repository is no longer available, or that there is a problem with your network connection.

It is always a good idea to run apt-get update before installing packages in a Docker container to ensure that you have the latest package information from the repository. This can help prevent errors and ensure that you have the latest versions of the packages you are installing.

Please, share the exact steps you made instead of referring to a guide that is most likely (but not not without doubt) is correct, but it can be followed incorrectly.