Install Docker on Ubuntu or Debian
Installing Docker on Ubuntu or Debian only takes a few commands. This should all take only a few minutes. Let's dive in.
First, you need to remove any Docker dependencies. (If you've never installed Docker before, don't worry. You can skip this step.)
Now we need to set up the Docker repository, add the official GPG key, and verify it.
Next, we add the GPGKey.
Now, we need to verify the fingerprint and check it matches this:
- 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
If that's all good, we add the Docker repository.
Okay, now that we've got the repository set up and verified, it's time to install Docker.
At this point, it's good to start a container to check that Docker installed correctly.
You'll notice that if you want to start Docker as a non-root user, you'll probably run into this error message.
Don't worry. There's an easy fix for that. First, create the docker group.
Then add the non-root user to the group.
With all that done, you've got Docker set up and ready to use.