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 CentOS

10min

Installing Docker on CentOS is fairly straightforward and only takes a few commands. So let's go through it step by step.

1. Remove Docker

Before we start, we need to remove any Docker dependencies. If you've never installed Docker, don't worry. You can skip this step.

Linux
|
$ sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine


2. Set up the repository

We need to install the yum-utils package. yum-utils gives us the yum-config-manager that we need to set up the repository.

Linux
|
$ sudo yum install -y yum-utils

$ sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo


3. Install Docker

With yum-utils installed, we can go ahead and install Docker.

Linux
|
$ sudo yum install docker-ce docker-ce-cli containerd.io


4. Test its working

Now everything is installed, we should test if it's working. So start Docker.

Linux
|
$ sudo systemctl start docker


Now, start a container to check that Docker is installed correctly.

Linux
|
$ sudo docker run hello-world


5. 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.

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, let's 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 26 May 2023
Did this page help you?
PREVIOUS
Creating a Dockerhub account
NEXT
Install Docker on Ubuntu or Debian
Docs powered by
Archbee
TABLE OF CONTENTS
1. Remove Docker
2. Set up the repository
3. Install Docker
4. Test its working
5. Add non-root users
Docs powered by
Archbee