Skip to content

Kledenai/docker-installation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker installation

Ubuntu version Docker version

Documentation Content

System Requirements

These are the dependencies that will be needed to install the docker

  • Ubuntu Server >= 18.04
  • Git

Getting Started

To start clone the repository:

git clone https://github.com/Kledenai/docker-installation.git

Running With Scripts

This is a more automatic way to install the docker, running this code in your server.

sudo ./install.sh

obs: you have to be inside the root folder of that repository.

After the script finishes running everything it needs, run the following command to check if the docker is installed correctly.

sudo docker version

Running Manually

This is the manual form, there are a few more steps, but you can check each step by step and better understand what is happening

if you have an old docker installation run the following command

sudo apt-get -y remove docker docker-engine docker-cli docker-ce-cli docker.io

in case you have already installed the docker with the snap on your machine, run the following command:

sudo snap remove docker

Update all linux packages

sudo apt-get update

start docker installation

sudo apt-get -y install docker.io

Start docker service in the machine

sudo systemctl start docker

Now enable the docker on the server

sudo systemctl enable docker

Need to increase the value of the map count, run this command below

sudo sysctl -w vm.max_map_count=262144

if everything went well, run the command below to verify that both the client and the docker engine are installed

sudo docker version

Common Mistakes

It is very common for some errors to occur during installation

Having said that, I went through these errors which I will list here and will pass the solution on to them below

1º Error

docker.io : Depends: containerd (>= 1.2.6-0ubuntu1~)
E: Unable to correct problems, you have held broken packages.
solution:
sudo apt-get remove containerd.io

2º Error

Failed to start docker.service: Unit docker.service is masked.
solution:
sudo systemctl unmask docker