Docker ошибка при установке

Failed to start service: The service did not respond to the start or control request in a timely fashion
   at CommunityInstaller.Service.Service.<StartAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CommunityInstaller.Service.Manager.<AddServiceAsync>d__7.MoveNext()

I’m getting this error during install — the previous install hung and then onwards it does not complete successfully. Any idea how to repair this or cleanup and restart?

--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CommunityInstaller.ServiceAction.<DoAsync>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at CommunityInstaller.InstallWorkflow.<HandleD4WPackageAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CommunityInstaller.InstallWorkflow.<ProcessAsync>d__24.MoveNext()

Federico Navarrete's user avatar

asked May 15, 2020 at 3:45

Roy's user avatar

3

Disabling the power service worked for me too.

  1. Open msconfig.exe in the windows menu bar
  2. Go to the «services» tab
  3. Start typing «power» and it will auto find the correct service.
  4. Untick the checkbox
  5. Restart your PC
  6. Make sure you do not have any Docker installation files in your drive
  7. Start the installation process again and hopefully that’ll work for you

answered Sep 7, 2020 at 14:53

Ashique Ansari's user avatar

4

I had the same issue and seemed to start happening after the lasted window update.

I manage to solve the issue by stopping and disabling the «power» (Power management) window service. I did repeat the process two times and seemed to be a consistent issue, at least in my case. Be sure this service is not running, at least in my case it worked, hope this helps.

Some references:
— https://github.com/docker/for-win/issues/6091

answered May 19, 2020 at 15:36

Rigre Garciandía's user avatar

1

To anyone getting this error:

Component CommunityInstaller.EnableFeaturesAction failed

The fix for me was enabling this service:

Windows Modules Installer

Note I used a tool [1] to do this, but I think you can also just use the normal Services App.

  1. https://github.com/WereDev/Wu10Man

answered May 23, 2021 at 2:25

Zombo's user avatar

I tried everything (reboot, different versions 2.5, 3.0, 3.3, power, disabling real-time protection). Only increasing timeout helped me:

  1. Click Start, click Run, type Regedit, and then click OK.
  2. Locate and then click the following registry subkey:
  3. HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl
  4. In the right pane, locate the ServicesPipeTimeout entry.
    Note If the ServicesPipeTimeout entry does not exist, you must create it. To do this, follow these steps:
  • On the Edit menu, point to New, and then click DWORD Value.
  • Type ServicesPipeTimeout, and then press ENTER.
  1. Right-click ServicesPipeTimeout, and then click Modify.
  2. Click decimal, type 60000, and then click OK.

Federico Navarrete's user avatar

answered Apr 30, 2021 at 14:25

Sergey's user avatar

3

I faced the same issue while installing Docker 3.5.0

Download failed: Could not find a part of the path ‘C:UsersnameAppDataLocalTemprzsiezg3p2h’. at CommunityInstaller.InstallWorkflow.d__23.MoveNext()

I resolved it by following these steps.

  1. Download and install docker 2.5.0.1
  2. After installation open docker desktop.
  3. A pop-up appears to update docker to 3.4.0 (or later), click update.
  4. Once updated you are ready to launch and play with docker desktop.

Alternately you can try downloading and installing docker 3.4.0 directly.

Federico Navarrete's user avatar

answered Jun 24, 2021 at 18:26

Varun's user avatar

VarunVarun

4123 silver badges14 bronze badges

For me the issue was related to https://github.com/docker/for-win/issues/127

A different version of NLog from the windows GAC was interfering with the one that comes with the docker installation.

To resolve this the version in the GAC has to be deleted:

  1. go to %windir%Microsoft.NETassembly
  2. find the folder NLog
  3. delete it

answered Sep 8, 2021 at 12:41

Hein Breukers's user avatar

I have faced a similar issue and needed to do the following:

  1. Uninstall.

  2. If there are any leftovers, you should:

    • Run the RegEdit with Admin Rights.
    • Delete all remaining entries of Docker Desktop.

After this, I was able to install it properly. Also, I have noticed in my case, this situation has become repetitive in every update.

P.S.:

The power idea proposed in the previous answers didn’t work in my case. Somehow, the installation got corrupted and couldn’t run. This has happened more than once after Docker tries to update.

answered Apr 14, 2021 at 6:15

Federico Navarrete's user avatar

Docker components require a compatibility layer for running Linux binary executables natively on Windows 10 and Windows 11.( When you opt for «install required components for WSL2» ).Try installing WSL before installing docker on your system. To install WSL and Docker, follow these steps~

  1. Right click on CMD (Command Prompt)
  2. Run as administration
  3. Enter the following command~

wsl --install
4. After completion, restart your computer
5. Try reinstalling docker

Before installing WSL, make sure your windows version is updated.

Refer this link to install WSL

answered Oct 26, 2021 at 13:00

chriss.py chicken's user avatar

1

component communityinstaller.enablefeaturesaction failed: invalid
namespace at communityinstaller.installworkflow.d_29.movenext() —
end of stack trace from previous location where exception was thrown
— at system.runtime.exceptionservices.exceptiondispatchinfo.throw() at
system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification(task
task) at communityinstaller.installworkflow.d_23.movenext()

If this is the issue while installing the Docker desktop in windows

While installing docker desktop, by default WSL2 and  Add shortcut to desktop is ticked or checked as shown in image

Ans:- uncheck the first configuration from the image (i.e ‘Install required Windows components for WSL 2’)

Federico Navarrete's user avatar

answered Jun 20, 2021 at 14:25

Vineet Lokur's user avatar

I am late to answer but I am able to solve this issue using simple fix.
This is valid if you have recently upgraded your Windows OS to latest version.

  1. Open Windows in Safe Mode
  2. go to run and type -> RegEdit
  3. Traverse to ComputerHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSysPlant
  4. Now change Start value to 4.
  5. Restart and try to install docker now.

answered Jul 12, 2021 at 13:39

Sagar Pawar's user avatar

I updated Windows 10 using Windows 10 Update Assistant, and the docker got installed.

(The update was from version 19042.1237 to 19043.1237)

answered Oct 3, 2021 at 12:07

Eugene Ihnatsyeu's user avatar

Same problem present on my system, while upgrading to 3.2.2 with Chocolatey

2021-03-29 23:03:22,444 10776 [INFO ] — VERBOSE: Installation failed
2021-03-29 23:03:22,446 10776 [INFO ] — VERBOSE: Failed to register product: The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))
2021-03-29 23:03:22,452 10776 [INFO ] — VERBOSE: at CommunityInstaller.InstallWorkflow.d__29.MoveNext()
2021-03-29 23:03:22,457 10776 [INFO ] — VERBOSE: — End of stack trace from previous location where exception was thrown —
2021-03-29 23:03:22,461 10776 [INFO ] — VERBOSE: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-03-29 23:03:22,464 10776 [INFO ] — VERBOSE: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2021-03-29 23:03:22,472 10776 [INFO ] — VERBOSE: at CommunityInstaller.InstallWorkflow.d__23.MoveNext()
2021-03-29 23:03:22,500 10776 [ERROR] — [23:00:11.174] [UninstallWorkflow] Failed to unregister
2021-03-29 23:03:22,513 10776 [ERROR] — Exception type: System.Runtime.InteropServices.COMException, Exception message: The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE)), StackTrace:
2021-03-29 23:03:22,521 10776 [ERROR] — at WindowsBits.IBackgroundCopyJob.Cancel()
2021-03-29 23:03:22,527 10776 [ERROR] — at CommunityInstaller.UninstallWorkflow.d__14.MoveNext()
2021-03-29 23:03:22,533 10776 [ERROR] — [23:03:17.516] [InstallWorkflow] Installation failed
2021-03-29 23:03:22,540 10776 [ERROR] — Exception type: System.Exception, Exception message: Failed to register product: The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE)), StackTrace:
2021-03-29 23:03:22,546 10776 [ERROR] — at CommunityInstaller.InstallWorkflow.d__29.MoveNext()
2021-03-29 23:03:22,552 10776 [ERROR] — — End of stack trace from previous location where exception was thrown —
2021-03-29 23:03:22,556 10776 [ERROR] — at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2021-03-29 23:03:22,565 10776 [ERROR] — at CommunityInstaller.InstallWorkflow.d__23.MoveNext()
2021-03-29 23:03:22,572 10776 [ERROR] — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-03-29 23:03:22,577 10776 [DEBUG] — Command [«C:Userssdekooter_prox1AppDataLocalTempchocolateydocker-desktop3.2.2Docker Desktop Installer.exe» install —quiet ] exited with ‘1’.
2021-03-29 23:03:22,642 10776 [ERROR] — ERROR: Running [«C:Userssdekooter_prox1AppDataLocalTempchocolateydocker-desktop3.2.2Docker Desktop Installer.exe» install —quiet ] was not successful. Exit code was ‘1’. See log for possible error messages.
2021-03-29 23:03:22,653 10776 [DEBUG] — Built-in PowerShell host called with [‘[System.Threading.Thread]::CurrentThread.CurrentCulture = »;[System.Threading.Thread]::CurrentThread.CurrentUICulture = »; & import-module -name ‘C:ProgramDatachocolateyhelperschocolateyInstaller.psm1’; & ‘C:ProgramDatachocolateyhelperschocolateyScriptRunner.ps1’ -packageScript ‘C:ProgramDatachocolateylibdocker-desktoptoolschocolateyinstall.ps1′ -installArguments » -packageParameters »’] exited with ‘1’.
2021-03-29 23:03:22,657 10776 [DEBUG] — Calling command [‘»C:windowsSystem32shutdown.exe» /a’]
2021-03-29 23:03:22,779 10776 [DEBUG] — Command [‘»C:windowsSystem32shutdown.exe» /a’] exited with ‘1116’
2021-03-29 23:03:22,897 10776 [INFO ] — docker-desktop may be able to be automatically uninstalled.

sudo apt install docker-ce
Чтение списков пакетов… Готово
Построение дерева зависимостей       
Чтение информации о состоянии… Готово
Предлагаемые пакеты:
  aufs-tools
Следующие пакеты будут обновлены:
  docker-ce
Обновлено 1 пакетов, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 3 пакетов не обновлено.
Необходимо скачать 24,8 MB архивов.
После данной операции объём занятого дискового пространства возрастёт на 37,9 kB.
Пол:1 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce amd64 5:20.10.2~3-0~ubuntu-focal [24,8 MB]
Получено 24,8 MB за 4с (7 050 kB/s)     
(Чтение базы данных … на данный момент установлено 318900 файлов и каталогов.)
Подготовка к распаковке …/docker-ce_5%3a20.10.2~3-0~ubuntu-focal_amd64.deb …
Распаковывается docker-ce (5:20.10.2~3-0~ubuntu-focal) на замену (5:20.10.2~3-0~ubuntu-bionic) …
Настраивается пакет docker-ce (5:20.10.2~3-0~ubuntu-focal) …
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "restart" failed.
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Wed 2021-01-13 10:12:25 MSK; 4ms ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
    Process: 24233 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
   Main PID: 24233 (code=exited, status=1/FAILURE)
dpkg: ошибка при обработке пакета docker-ce (--configure):
 installed docker-ce package post-installation script subprocess returned error exit status 1
Обрабатываются триггеры для systemd (245.4-4ubuntu3.3) …
При обработке следующих пакетов произошли ошибки:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

Docker is a tool that was designed for software developers to be able to transport and deliver their applications to others in a packaged form. These packages are known as containers in Docker terms. Docker-CE or (Community Edition) is the re-launched version of the Docker software. While attempting to install this tool on your system, the “package docker-ce has no installation candidate” issue can pop up.

This article will give you knowledge about the reasons for this error and also provide details about its solutions.

This section provides detailed reasoning and will also state the possible solutions to fix the error. Let’s dig into the reasons and their respective solutions:

Reason: Docker Repository Missing

This error is most commonly invoked when the Docker-CE installation is attempted directly without its repository being added to the system. First, let’s see the error statement when we attempt to install this software directly using the command:

$ sudo apt install docker-ce

Solution: Add Repository of Docker-CE and its GPG Key

The best solution for this issue is to add and set up the Docker repository before the installation. To carry out the successful installation of the Docker-CE, just perform the following steps:

Step 1: Update System Packages

First and most obvious step is to update your system repositories using the command below:

Step 2: Add the GPG Key oF Docker’s Repository

Now, you need to get the GPG key for the Docker Repository using the command shown below as it will allow the Repository to be run:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg

Step 3: Add the Docker Repository

Once you get the key from the step above, now the repository itself can be downloaded by executing the following command in the terminal:

$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Step 4: Update the Core Libraries

Update the repositories to use the new Docker repository with the following command:

$ sudo apt install update

Step 5: Install Docker

Now, the command provided below will install the Docker-CE without any error:

$ sudo apt install docker-ce docker-ce-cli containerd.io

As the snippet above demonstrates, the “package docker ce has no installation candidate” problem has been resolved, and the Docker-CE can be installed easily.

That’s all from this guide!

Conclusion

The “package docker ce has no installation candidate” issue occurs when the Docker Repository is not installed on your system and you attempt to install Docker-CE directly. This can be resolved by adding the GPG key and then the repository. This article has explained the reasons that invoke this error, and the solution is also demonstrated.

I am getting the below error message when running the below command for installing docker and kubernetes in Ubuntu server.

root@master:/home/ubuntu# add-apt-repository 
>   "deb [arch=amd64] https://download.docker.com/linux/ubuntu 
>   $(lsb_release -cs) 
>   stable"
Hit:1 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]
Hit:3 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu bionic-security InRelease
**Err:2 https://download.docker.com/linux/ubuntu bionic InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8**
Reading package lists... Done
W: GPG error: https://download.docker.com/linux/ubuntu bionic 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 bionic 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.
root@master:/home/ubuntu#

I have also ran the below command but no luck

root@master:/# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7EA0A9C3F273FCD8
Executing: /tmp/apt-key-gpghome.rDOuMCVLF2/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 7EA0A9C3F273FCD8
gpg: keyserver receive failed: No keyserver available

Promise Preston's user avatar

asked Feb 9, 2020 at 13:55

Chandra's user avatar

I had this exact problem. I believe it was caused by my default umask, which caused some of the Docker files to be installed with incorrect permissions. I was able to fix it by correcting the file permissions the docker key file:

sudo chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg

answered Aug 12, 2021 at 20:54

qarl's user avatar

qarlqarl

7485 silver badges8 bronze badges

5

EDIT: This answer apparently does not work any more

Run this to add the correct key:

# Does not work any more
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Source: https://docs.docker.com/install/linux/docker-ce/ubuntu/

answered Apr 6, 2020 at 10:51

tuomassalo's user avatar

tuomassalotuomassalo

8,6776 gold badges48 silver badges50 bronze badges

3

First, add Docker’s official GPG key:

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

or in other cases (macOS)

sudo mkdir -p /usr/share/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor --yes -o /usr/share/keyrings/docker-archive-keyring.gpg

PS For some the part gpgp --dearmor was useful.

Second, update permissions for it:

sudo chmod a+r /etc/apt/keyrings/docker.gpg

or in other cases (macOS)

sudo chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg

Install Docker Engine on Ubuntu - Official Docker Documentation

answered Nov 16, 2021 at 8:37

shilovk's user avatar

shilovkshilovk

11.4k17 gold badges73 silver badges73 bronze badges

10

There is issue with Debian Testing (bullseye):

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

But can be solved with:

 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Uwe Keim's user avatar

Uwe Keim

39.3k56 gold badges174 silver badges291 bronze badges

answered Jun 20, 2021 at 20:18

stefaca's user avatar

stefacastefaca

3634 silver badges10 bronze badges

4

from: https://docs.docker.com/engine/install/ubuntu/
It works in ubuntu 20.04

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo 
  "deb [arch=amd64 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
sudo apt-get update
sudo apt-get --assume-yes install docker-ce docker-ce-cli containerd.io

answered Sep 23, 2021 at 11:03

Math's user avatar

MathMath

7581 gold badge8 silver badges18 bronze badges

3

Make sure /usr/share/keyrings/docker-archive-keyring.gpg is global readable.

# ls -l /usr/share/keyrings/docker-archive-keyring.gpg
-rw-rw---- 1 root root 2760 Aug 17 06:46 /usr/share/keyrings/docker-archive-keyring.gpg
strace -f apt update 2>&1 | grep docker-archive-keyring
[pid  9453] faccessat(AT_FDCWD, "/usr/share/keyrings/docker-archive-keyring.gpg", R_OK) = -1 EACCES (Permission denied)
# chmod o+r /usr/share/keyrings/docker-archive-keyring.gpg
# strace -f apt update 2>&1 | grep docker-archive-keyring
[pid  9772] faccessat(AT_FDCWD, "/usr/share/keyrings/docker-archive-keyring.gpg", R_OK) = 0
[pid  9795] openat(AT_FDCWD, "/usr/share/keyrings/docker-archive-keyring.gpg", O_RDONLY) = 4
[pid  9795] access("/usr/share/keyrings/docker-archive-keyring.gpg", F_OK) = 0
[pid  9795] access("/usr/share/keyrings/docker-archive-keyring.gpg", R_OK) = 0
[pid  9795] openat(AT_FDCWD, "/usr/share/keyrings/docker-archive-keyring.gpg", O_RDONLY) = 6
[pid  9795] openat(AT_FDCWD, "/usr/share/keyrings/docker-archive-keyring.gpg", O_RDONLY) = 7
[pid  9795] openat(AT_FDCWD, "/usr/share/keyrings/docker-archive-keyring.gpg", O_RDONLY) = 8

answered Aug 17, 2021 at 6:59

schemacs's user avatar

schemacsschemacs

2,7438 gold badges35 silver badges53 bronze badges

1

Here’s the error

W: GPG error: https://download.docker.com/linux/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8

Copy the key that follows NO_PUBKEY and do

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys <the key>

Make sure you replace <the key> with the key you copied
And then run your command again

answered Jan 10, 2022 at 7:47

Obed Amoako's user avatar

Obed AmoakoObed Amoako

3534 silver badges7 bronze badges

2

For 22.04 I had to do:

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

specifically, get the output to go to /etc/apt/trusted.gpg.d/docker.gpg

answered May 19, 2022 at 19:13

robm's user avatar

robmrobm

1,2931 gold badge16 silver badges23 bronze badges

1

There’re many reasons why you can get the «public key is not available» and most of them are listed above. However I recently had an unexpected one.

I believe somewhere between 20.04 and 22.04 there was a change in the apt behavior. Both versions support armored gpg keys (true since 1.4, around 2017). But there’s a difference:

  1. In 20.04 apt v2.0 ACCEPTS an armored key from a file with the .gpg extension
  2. In 22.04 apt v2.4 IGNORES armored keys if they have a .gpg extension. It requires them to have an .asc or .pub extension instead.

It was a bit puzzling when a tested and stable ansible playbook installing docker stopped working after switching to 22.04. Changing the file extension fixed the issue.

answered Oct 20, 2022 at 14:39

salmin's user avatar

salminsalmin

4373 silver badges11 bronze badges

1

If you did followed the Install Docker Engine on Ubuntu steps, Please see your permissions file /usr/share/keyrings/.

It should be -rw-r--r-- 1 root root 2.7K Sep 13 05:46 docker-archive-keyring.gpg

-rw-r--r--

I changed permissions before it -rw-r----- into -rw-r--r--
by using this command

sudo chmod o+r /usr/share/keyrings/docker-archive-keyring.gpg

And then check it by using apt update, it’s working for me.

bad_coder - on strike's user avatar

answered Sep 12, 2021 at 22:57

Rachmat Fandi's user avatar

Ubuntu 20.04, this is what you should do:

echo "deb [arch=amd64 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

INSTEAD OF

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

On the docker website, this line got updated and /usr/share/keyrings/docker-archive-keyring.gpg became /etc/apt/keyrings/docker.gpg.

answered Jul 19, 2022 at 7:46

SHANNAX's user avatar

SHANNAXSHANNAX

3233 silver badges5 bronze badges

I was experiencing this issue while installing docker in Ubuntu 22.04.
While I did not take the time to understand what I was missing, I found this link to have helped with this. Install docker in ubuntu 22.04

answered Jul 27, 2022 at 23:23

Eric's user avatar

EricEric

94012 silver badges27 bronze badges

I ended up here because I was trying to install Docker on Ubuntu 22.04.1 by adding their repo to the apt config. I was setting up an ansible playbook to do this.

Like many others above, I was having problems with the The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ...** error.

I eventually settled on the following piece of ansible to get the job done:

    - name: setting up docker apt repo
      block:
        - name: get docker gpg key
          become: true
          get_url:
            url: https://download.docker.com/linux/ubuntu/gpg
            dest: /usr/share/keyrings/docker-archive-keyring-armored.gpg
        - name: CMD - process docker key
          become: true
          shell:
            cmd: cat /usr/share/keyrings/docker-archive-keyring-armored.gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
        - name: configure docker apt source
          become: true        
          apt_repository:
            repo: "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
            state: present

Putting this here for the next poor sod that wants to make this go.

answered Sep 26, 2022 at 7:35

Ausfestivus's user avatar

In my case, it was necessary to check that the repositories were correctly specified in the /etc/apt/sources.list.d/.

Specifically, in my case I removed the file: /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list.

cconsta1's user avatar

cconsta1

6621 gold badge6 silver badges20 bronze badges

answered May 7 at 12:51

Evgenii Shelikhov's user avatar

In file sources.list ->
in the line where the repository is specified, you need to add an entry before the address (in square brackets)

[arch=amd64 signed-by=/etc/apt/keyrings/docker-archive-keyrings.gpg] https://download.docker.com/linux/debian stable

answered Jun 15 at 12:54

Speedy Gonzales's user avatar

  • Docker ошибка при запуске windows
  • Docker ошибка hyper v
  • Docker pull mysql ошибка
  • Docash golf ошибка е02
  • Docash golf ошибка e11