First make sure to uninstall older versions of docker by running
$ sudo apt-get remove docker docker-engine docker.io containerd runc
Step 1: $ sudo apt-get update
Hit:1 http://ppa.launchpad.net/flexiondotorg/youtube-dl-gui/ubuntu disco InRelease
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 https://deb.nodesource.com/node_12.x disco InRelease
Ign:4 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 InRelease
Hit:5 http://tz.archive.ubuntu.com/ubuntu disco InRelease
Hit:6 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu disco InRelease
Hit:7 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release
Get:8 http://security.ubuntu.com/ubuntu disco-security InRelease [97.5 kB]
Hit:9 http://dl.google.com/linux/chrome/deb stable Release
Hit:10 http://tz.archive.ubuntu.com/ubuntu disco-updates InRelease
Hit:11 http://ppa.launchpad.net/ondrej/php/ubuntu disco InRelease
Hit:12 https://repo.skype.com/deb stable InRelease
Hit:13 http://packages.microsoft.com/repos/vscode stable InRelease
Get:14 http://tz.archive.ubuntu.com/ubuntu disco-backports InRelease [88.8 kB]
Get:17 http://security.ubuntu.com/ubuntu disco-security/main amd64 Packages [213 kB]
Get:18 http://security.ubuntu.com/ubuntu disco-security/main i386 Packages [171 kB]
Get:19 http://security.ubuntu.com/ubuntu disco-security/main amd64 c-n-f Metadata [4,884 B]
Fetched 575 kB in 8s (76.0 kB/s)
Reading package lists... Done
Step 2:$ sudo apt-get install \
> apt-transport-https \
> ca-certificates \
> curl \
> gnupg-agent \
> software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates is already the newest version (20190110).
software-properties-common is already the newest version (0.97.11).
curl is already the newest version (7.64.0-2ubuntu1.2).
apt-transport-https is already the newest version (1.8.3).
The following NEW packages will be installed:
gnupg-agent
0 upgraded, 1 newly installed, 0 to remove and 51 not upgraded.
Need to get 4,820 B of archives.
After this operation, 44.0 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://tz.archive.ubuntu.com/ubuntu disco/universe amd64 gnupg-agent all 2.2.12-1ubuntu3 [4,820 B]
Fetched 4,820 B in 1s (3,511 B/s)
Selecting previously unselected package gnupg-agent.
(Reading database ... 274385 files and directories currently installed.)
Preparing to unpack .../gnupg-agent_2.2.12-1ubuntu3_all.deb ...
Unpacking gnupg-agent (2.2.12-1ubuntu3) ...
Setting up gnupg-agent (2.2.12-1ubuntu3) ...
Step 3 $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
Step 4 $ sudo apt-key fingerprint 0EBFCD88
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]
Step 5~$ sudo add-apt-repository \
> "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
> $(lsb_release -cs) \
> stable"
Hit:1 http://ppa.launchpad.net/flexiondotorg/youtube-dl-gui/ubuntu disco InRelease
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease
Ign:3 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 InRelease
Get:4 https://download.docker.com/linux/ubuntu disco InRelease [44.4 kB]
Hit:5 http://dl.google.com/linux/chrome/deb stable Release
Hit:6 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release
Hit:7 http://tz.archive.ubuntu.com/ubuntu disco InRelease
Hit:8 http://security.ubuntu.com/ubuntu disco-security InRelease
Hit:10 http://tz.archive.ubuntu.com/ubuntu disco-updates InRelease
Hit:11 https://repo.skype.com/deb stable InRelease
Hit:12 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:13 https://deb.nodesource.com/node_12.x disco InRelease
Get:15 http://tz.archive.ubuntu.com/ubuntu disco-backports InRelease [88.8 kB]
Get:16 https://download.docker.com/linux/ubuntu disco/stable amd64 Packages [2,898 B]
Hit:17 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu disco InRelease
Hit:18 http://ppa.launchpad.net/ondrej/php/ubuntu disco InRelease
Fetched 136 kB in 6s (22.6 kB/s)
Reading package lists... Done
Step 6 $ sudo apt-get update
Hit:1 http://ppa.launchpad.net/flexiondotorg/youtube-dl-gui/ubuntu disco InRelease
Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:3 http://security.ubuntu.com/ubuntu disco-security InRelease
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:5 http://tz.archive.ubuntu.com/ubuntu disco InRelease
Hit:6 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu disco InRelease
Ign:7 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 InRelease
Hit:8 https://download.docker.com/linux/ubuntu disco InRelease
Hit:9 https://deb.nodesource.com/node_12.x disco InRelease
Hit:10 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release
Hit:11 http://tz.archive.ubuntu.com/ubuntu disco-updates InRelease
Hit:12 http://ppa.launchpad.net/ondrej/php/ubuntu disco InRelease
Hit:13 http://dl.google.com/linux/chrome/deb stable Release
Get:14 http://tz.archive.ubuntu.com/ubuntu disco-backports InRelease [88.8 kB]
Hit:16 https://repo.skype.com/deb stable InRelease
Fetched 88.8 kB in 5s (16.2 kB/s)
Reading package lists... Done
justinelim@justinelim:~$ sudo apt-get install docker-ce docker-ce-cli containerd.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
aufs-tools cgroupfs-mount pigz
The following NEW packages will be installed:
aufs-tools cgroupfs-mount containerd.io docker-ce docker-ce-cli pigz
0 upgraded, 6 newly installed, 0 to remove and 51 not upgraded.
Need to get 87.9 MB of archives.
After this operation, 390 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://download.docker.com/linux/ubuntu disco/stable amd64 containerd.io amd64 1.2.6-3 [22.6 MB]
Get:2 http://tz.archive.ubuntu.com/ubuntu disco/universe amd64 pigz amd64 2.4-1 [57.4 kB]
Get:3 http://tz.archive.ubuntu.com/ubuntu disco/universe amd64 aufs-tools amd64 1:4.9+20170918-2 [104 kB]
Get:4 http://tz.archive.ubuntu.com/ubuntu disco/universe amd64 cgroupfs-mount all 1.4 [6,320 B]
Get:5 https://download.docker.com/linux/ubuntu disco/stable amd64 docker-ce-cli amd64 5:19.03.2~3-0~ubuntu-disco [42.5 MB]
Get:6 https://download.docker.com/linux/ubuntu disco/stable amd64 docker-ce amd64 5:19.03.2~3-0~ubuntu-disco [22.7 MB]
Fetched 87.9 MB in 1min 20s (1,096 kB/s)
Selecting previously unselected package pigz.
(Reading database ... 274389 files and directories currently installed.)
Preparing to unpack .../0-pigz_2.4-1_amd64.deb ...
Unpacking pigz (2.4-1) ...
Selecting previously unselected package aufs-tools.
Preparing to unpack .../1-aufs-tools_1%3a4.9+20170918-2_amd64.deb ...
Unpacking aufs-tools (1:4.9+20170918-2) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../2-cgroupfs-mount_1.4_all.deb ...
Unpacking cgroupfs-mount (1.4) ...
Selecting previously unselected package containerd.io.
Preparing to unpack .../3-containerd.io_1.2.6-3_amd64.deb ...
Unpacking containerd.io (1.2.6-3) ...
Selecting previously unselected package docker-ce-cli.
Preparing to unpack .../4-docker-ce-cli_5%3a19.03.2~3-0~ubuntu-disco_amd64.deb ...
Unpacking docker-ce-cli (5:19.03.2~3-0~ubuntu-disco) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../5-docker-ce_5%3a19.03.2~3-0~ubuntu-disco_amd64.deb ...
Unpacking docker-ce (5:19.03.2~3-0~ubuntu-disco) ...
Setting up aufs-tools (1:4.9+20170918-2) ...
Setting up containerd.io (1.2.6-3) ...
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
Setting up docker-ce-cli (5:19.03.2~3-0~ubuntu-disco) ...
Setting up pigz (2.4-1) ...
Setting up cgroupfs-mount (1.4) ...
Setting up docker-ce (5:19.03.2~3-0~ubuntu-disco) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Processing triggers for systemd (240-6ubuntu5.7) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.29-0ubuntu2) …
Step 7 $ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:b8ba256769a0ac28dd126d584e0a2011cd2877f3f76e093a7ae560f2a5301c00
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
Comments
Post a Comment