A Docker installation

Russell Bateman
February 2019
last update:


This is just to show how Docker installed on my Linux Mint 18.2 Sonya desktop. Three years later, this exact procedure works (for DISTRIB_CODENAME focal) on Linux Mint 20.3 Una identically.

russ@gondolin ~ $ sudo bash
gondolin ~ # lsb_release -a
No LSB modules are available.
Distributor ID:	LinuxMint
Description:	Linux Mint 18.2 Sonya
Release:	18.2
Codename:	sonya
gondolin ~ # cat /etc/upstream-release/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"
gondolin ~ # apt-get update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Ign:2 http://packages.linuxmint.com sonya InRelease
Hit:3 http://archive.canonical.com/ubuntu xenial InRelease
Hit:4 http://dl.google.com/linux/chrome/deb stable Release
Hit:5 http://packages.linuxmint.com sonya Release
Hit:6 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:8 http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu xenial InRelease [23.8 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Hit:12 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Hit:13 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial InRelease
Ign:14 https://mkvtoolnix.download/debian stretch InRelease
Get:15 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Hit:16 http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu xenial InRelease
Hit:17 https://mkvtoolnix.download/debian stretch Release
Fetched 349 kB in 1s (272 kB/s)
Reading package lists... Done
gondolin ~ # apt-get install apt-transport-https ca-certificates curl software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-transport-https is already the newest version (1.2.29ubuntu0.1).
ca-certificates is already the newest version (20170717~16.04.2).
curl is already the newest version (7.47.0-1ubuntu2.12).
The following NEW packages will be installed:
  software-properties-common
0 upgraded, 1 newly installed, 0 to remove and 21 not upgraded.
Need to get 5,478 B of archives.
After this operation, 12.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://packages.linuxmint.com sonya/upstream amd64 software-properties-common all 1.6.7 [5,478 B]
Fetched 5,478 B in 0s (27.7 kB/s)
Selecting previously unselected package software-properties-common.
(Reading database ... 417938 files and directories currently installed.)
Preparing to unpack .../software-properties-common_1.6.7_all.deb ...
Unpacking software-properties-common (1.6.7) ...
Setting up software-properties-common (1.6.7) ...
gondolin ~ # curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
OK
gondolin ~ # add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
gondolin ~ # apt-get update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Ign:2 http://packages.linuxmint.com sonya InRelease
Hit:3 http://dl.google.com/linux/chrome/deb stable Release
Hit:4 http://packages.linuxmint.com sonya Release
Hit:6 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:7 http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu xenial InRelease
Get:8 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:9 https://download.docker.com/linux/ubuntu xenial InRelease [66.2 kB]
Hit:10 http://archive.canonical.com/ubuntu xenial InRelease
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Hit:13 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial InRelease
Get:14 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages [6,043 B]
Hit:15 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Hit:16 http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu xenial InRelease
Ign:17 https://mkvtoolnix.download/debian stretch InRelease
Get:18 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Hit:19 https://mkvtoolnix.download/debian stretch Release
Fetched 397 kB in 1s (318 kB/s)
Reading package lists... Done
gondolin ~ # apt-cache policy docker-ce
docker-ce:
  Installed: (none)
  Candidate: 5:18.09.1~3-0~ubuntu-xenial
  Version table:
     5:18.09.1~3-0~ubuntu-xenial 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     5:18.09.0~3-0~ubuntu-xenial 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     18.06.1~ce~3-0~ubuntu 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     18.06.0~ce~3-0~ubuntu 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     18.03.1~ce-0~ubuntu 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     18.03.0~ce-0~ubuntu 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     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
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     17.09.1~ce-0~ubuntu 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     17.09.0~ce-0~ubuntu 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     17.06.2~ce-0~ubuntu 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     17.06.1~ce-0~ubuntu 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     17.06.0~ce-0~ubuntu 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     17.03.3~ce-0~ubuntu-xenial 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     17.03.2~ce-0~ubuntu-xenial 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     17.03.1~ce-0~ubuntu-xenial 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
     17.03.0~ce-0~ubuntu-xenial 500
        500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
gondolin ~ # apt-get install docker-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  containerd.io docker-ce-cli
Recommended packages:
  aufs-tools cgroupfs-mount | cgroup-lite pigz
The following NEW packages will be installed:
  containerd.io docker-ce docker-ce-cli
0 upgraded, 3 newly installed, 0 to remove and 21 not upgraded.
Need to get 50.2 MB of archives.
After this operation, 242 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://download.docker.com/linux/ubuntu xenial/stable amd64 containerd.io amd64 1.2.2-1 [19.9 MB]
Get:2 https://download.docker.com/linux/ubuntu xenial/stable amd64 docker-ce-cli amd64 5:18.09.1~3-0~ubuntu-xenial [13.0 MB]
Get:3 https://download.docker.com/linux/ubuntu xenial/stable amd64 docker-ce amd64 5:18.09.1~3-0~ubuntu-xenial [17.4 MB]
Fetched 50.2 MB in 2s (25.1 MB/s)
Selecting previously unselected package containerd.io.
(Reading database ... 417941 files and directories currently installed.)
Preparing to unpack .../containerd.io_1.2.2-1_amd64.deb ...
Unpacking containerd.io (1.2.2-1) ...
Selecting previously unselected package docker-ce-cli.
Preparing to unpack .../docker-ce-cli_5%3a18.09.1~3-0~ubuntu-xenial_amd64.deb ...
Unpacking docker-ce-cli (5:18.09.1~3-0~ubuntu-xenial) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../docker-ce_5%3a18.09.1~3-0~ubuntu-xenial_amd64.deb ...
Unpacking docker-ce (5:18.09.1~3-0~ubuntu-xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.15) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up containerd.io (1.2.2-1) ...
Setting up docker-ce-cli (5:18.09.1~3-0~ubuntu-xenial) ...
Setting up docker-ce (5:18.09.1~3-0~ubuntu-xenial) ...
update-alternatives: using /usr/bin/dockerd-ce to provide /usr/bin/dockerd (dockerd) in auto mode
Processing triggers for systemd (229-4ubuntu21.15) ...
Processing triggers for ureadahead (0.100.0-19) ...
gondolin ~ # systemctl status docker
 docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-02-08 08:50:09 MST; 8s ago
     Docs: https://docs.docker.com
 Main PID: 32338 (dockerd)
   CGroup: /system.slice/docker.service
           └─32338 /usr/bin/dockerd -H fd://

Feb 08 08:50:09 gondolin dockerd[32338]: time="2019-02-08T08:50:09.140591939-07:00" level=warning msg="Your kernel does
Feb 08 08:50:09 gondolin dockerd[32338]: time="2019-02-08T08:50:09.140624249-07:00" level=warning msg="Your kernel does
Feb 08 08:50:09 gondolin dockerd[32338]: time="2019-02-08T08:50:09.140631171-07:00" level=warning msg="Your kernel does
Feb 08 08:50:09 gondolin dockerd[32338]: time="2019-02-08T08:50:09.141010323-07:00" level=info msg="Loading containers:
Feb 08 08:50:09 gondolin dockerd[32338]: time="2019-02-08T08:50:09.221686540-07:00" level=info msg="Default bridge (dock
Feb 08 08:50:09 gondolin dockerd[32338]: time="2019-02-08T08:50:09.259481485-07:00" level=info msg="Loading containers:
Feb 08 08:50:09 gondolin dockerd[32338]: time="2019-02-08T08:50:09.314205268-07:00" level=info msg="Docker daemon" commi
Feb 08 08:50:09 gondolin dockerd[32338]: time="2019-02-08T08:50:09.314385234-07:00" level=info msg="Daemon has completed
Feb 08 08:50:09 gondolin dockerd[32338]: time="2019-02-08T08:50:09.351949317-07:00" level=info msg="API listen on /var/r
Feb 08 08:50:09 gondolin systemd[1]: Started Docker Application Container Engine.
gondolin ~ # usermod -aG docker russ
gondolin ~ # su - russ
russ@gondolin ~ $ logout
gondolin ~ # id -nG russ
russ adm cdrom sudo dip plugdev lpadmin sambashare docker
gondolin ~ # exit
russ@gondolin ~ $ which docker
/usr/bin/docker