项目作者: Kledenai

项目描述 :
Install the docker in fast time
高级语言: Shell
项目地址: git://github.com/Kledenai/docker-installation.git
创建时间: 2020-06-07T20:57:47Z
项目社区:https://github.com/Kledenai/docker-installation

开源协议:MIT License

下载


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:

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

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

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

  1. 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:

  1. sudo snap remove docker

Update all linux packages

  1. sudo apt-get update

start docker installation

  1. sudo apt-get -y install docker.io

Start docker service in the machine

  1. sudo systemctl start docker

Now enable the docker on the server

  1. sudo systemctl enable docker

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

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

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

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

2º Error

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