DevOpsDockerDockersHow toUncategorized

How to install Docker on Ubuntu & Ubuntu 18.x

Get Docker CE for Ubuntu:

OS requirements:
If you need to install Docker or Docker CE, you need Ubuntu 64-bit I mean one of these Ubuntu versions:

  • Zesty 17.04
  • Xenial 16.04 (LTS)
  • Trusty 14.04 (LTS)

Install using the repository:

Before starting to install Docker server or Docker DE, we need to set up the Docker repository on the host

  • Set up the repository:
  1. Update the apt package index:
$ sudo apt-get update 

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

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

3. 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 pub   4096R/0EBFCD88 2017-02-22       Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88 uid                  Docker Release (CE deb) <docker@docker.com> sub   4096R/F273FCD8 2017-02-

4. Use the following command to set up the stable repository. You always need the stable repository, even if you want to install builds from the edge or test repositories as well. To add the edge or test repository, add the word edge or test (or both) after the word stable in the commands below.

Note: The lsb_release -cs sub-command below returns the name of your Ubuntu distribution, such as xenial. Sometimes, in a distribution like Linux Mint, you might have to change $(lsb_release -cs) to your parent Ubuntu distribution. For example, if you are using Linux Mint Rafaela, you could use trusty.

x86_64 / amd64:

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

Install Docker CE:

  1. Update the apt package index.
$ sudo apt-get update

2. Install the latest version of Docker CE, or go to the next step to install a specific version. Any existing installation of Docker is replaced.

$ sudo apt-get install docker-ce

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

XuX yE1L 1E

Please type the text above:

Close
Close