Monday, 14 May 2018

Docker, debian (ubuntu, kali etc)




1.  Add the GPG key for the official Docker repository to the system

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

2. Add the Docker repository to APT sources:

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

3. update the package database with the Docker packages from the newly added repo:

sudo apt-get update

4. Make sure you are about to install from the Docker repo instead of the default Ubuntu 16.04 repo

apt-cache policy docker-ce

5. Ensure the version table has all docker.com sources.

  Candidate: 17.12.1~ce-0~ubuntu
  Version table:
     17.12.1~ce-0~ubuntu 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     17.12.0~ce-0~ubuntu 500

6. Install Docker

sudo apt-get install -y docker-ce

7. Check to ensure  Docker is running

sudo systemctl status docker

docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2016-05-01 06:53:52 CDT; 1 weeks 3 days ago
     Docs: https://docs.docker.com

References:
1. https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04