Docker Kiến Thức Linux Uncategorized

Install docker on ubuntu

OS requirements

To install Docker Engine – Community, you need the 64-bit version of one of these Ubuntu versions:

  • Eoan 19.10
  • Bionic 18.04 (LTS)
  • Xenial 16.04 (LTS)

Uninstall old versions

Older versions of Docker were called dockerdocker.io, or docker-engine. If these are installed, uninstall them:

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

Install using the repository

Before you install Docker Engine – Community for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from the repository.

SET UP THE REPOSITORY

Update the apt package index:

$ sudo apt-get update 

Install packages to allow apt to use a repository over HTTPS:

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

Add Docker’s official GPG key:

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

Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.

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

INSTALL DOCKER ENGINE – COMMUNITY

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

CHECKING

$ docker ps

Add Comment

Click here to post a comment