website logo
⌘K
What is Gameye?
Getting started
Getting ready to start
1. Set up your Docker Hub account
2: Set up your organization on Gameye
3. Sort and push your Docker file
4. Configure your ports
5. Start the API call
API
API endpoints
Regions and locations
Error handling
Guides
Integrations
Using Gameye
Working with Docker
Support
Getting support
Giving feedback
Troubleshooting
Troubleshooting problems
FAQs
How do I start using Gameye?
Do you require authorisation to use the API?
How does Gameye scale?
What is the difference between a location and a region?
Is Gameye free to use?
FAQs
Glossary
Docker
Container
Region
Image Registry
Bare metal
Flex metal
Cloud
Matchmaker
Changelogs
Docs powered by
Archbee
Guides
Working with Docker

Install Docker on Ubuntu or Debian

11min

Installing Docker on Ubuntu or Debian only takes a few commands. This should all take only a few minutes. Let's dive in.

1. Remove Docker

First, you need to remove any Docker dependencies. (If you've never installed Docker before, don't worry. You can skip this step.)

Linux
|
$ sudo apt-get remove docker docker-engine docker.io containerd runc


2. Set up the repository

Now we need to set up the Docker repository, add the official GPG key, and verify it.

Linux
|
$ sudo apt-get update

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common


Next, we add the GPGKey.

Linux
|
$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -


Now, we need to verify the fingerprint and check it matches this:

  • 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
Linux
|
$ sudo apt-key fingerprint 0EBFCD88

pub   4096R/0EBFCD88 2017-02-22
      Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid                  Docker Release (CE deb) <docker@docker.com>
sub   4096R/F273FCD8 2017-02-22


If that's all good, we add the Docker repository.

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


3. Install Docker

Okay, now that we've got the repository set up and verified, it's time to install Docker.

Linux
|
 $ sudo apt-get update
 $ sudo apt-get install docker-ce docker-ce-cli containerd.io


At this point, it's good to start a container to check that Docker installed correctly.

Linux
|
$ sudo docker run hello-world


4. Add non-root users

You'll notice that if you want to start Docker as a non-root user, you'll probably run into this error message.

Linux
|
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied



Don't worry. There's an easy fix for that. First, create the docker group.

Linux
|
$ sudo groupadd docker


Then add the non-root user to the group.

Linux
|
$ sudo usermod -aG docker $USER


With all that done, you've got Docker set up and ready to use.



Updated 17 May 2023
Did this page help you?
PREVIOUS
Install Docker on CentOS
NEXT
Getting support
Docs powered by
Archbee
TABLE OF CONTENTS
1. Remove Docker
2. Set up the repository
3. Install Docker
4. Add non-root users
Docs powered by
Archbee