I'm trying to install Docker on my Fedora 24 virtual guest OS. I found this command

curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add -

that should allow to get PGP public key, but got

sudo: apt-key: command not found

I'm not sure what the problem is, since, apt-get, for example, works well.

How to solve this issue?

  • Any comments from downvoter? – Andersson Apr 6 '17 at 11:07

On Fedora 24, you should use dnf to install Docker:

sudo dnf install docker

This will install version 1.10.3. (Fedora 25 and 26 have more recent versions.)

Alternatively, you can follow Docker’s instructions for Fedora if you want to install their version.

  • I got failed to synchronize cache for repo 'updates'. Do you have any idea what could cause this error? – Andersson Apr 6 '17 at 9:22
  • Not with that — dnf will tell you why it failed to synchronize, what does it say in your case? (Look at the rest of the error message.) – Stephen Kitt Apr 6 '17 at 9:28
  • I use new clear Fedora guest OS to get rid of failed to synchronize cache for repo 'updates'. Now sudo dnf install docker works fine. As for my question, it seems that apt-key supported by Ubuntu only... Thanks for suggesting right command – Andersson Apr 6 '17 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.