Skip to content

Latest commit

 

History

History
78 lines (54 loc) · 1.41 KB

docker_install.md

File metadata and controls

78 lines (54 loc) · 1.41 KB

Install Docker

Reason

Docker is util for create containers where you run programs you don't trust, software you don't want to install in your machine, servers and many other things

How To

Update

The first step is update your software

sudo apt update
sudo apt dist-upgrade

Install dependencies

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

Add Docker GPG Key

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

Verify Docker GPG Key

sudo apt-key fingerprint 0EBFCD88

You should be looking to something like this:

pub   rsa4096 2017-02-22 [SCEA]
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid           [ unknown] Docker Release (CE deb) <docker@docker.com>
sub   rsa4096 2017-02-22 [S]

Set Up the Repository

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

Install Docker Engine

sudo apt-get install docker-ce docker-ce-cli containerd.io

Add your user to the docker group

If you want to use docker and don't relay in sudo one way to do it is add your user to the docker group

sudo usermod -aG docker $USER

Verify that Docker Engine is installed

sudo docker run hello-world