How to install Docker on Debian 8.8 Jessie

Debian Tutorial – Hello, welcome to my website and today we will learn how to install Docker on Debian 8.8 Server. Before we go through, you may want to power up a Debian 8.8 server in the cloud using DigitalOcean Droplet. Its an easy way to setup a low cost private cloud server, starting from $5. I just created a new server instance on DigitalOcean with Debian 8.8 Jessie.

install docker on debian 8

Steps to install Docker on Debian 8.8 Jessie

Step 1. Update Debian

apt update && apt upgrade

Step 2. Setup Repository

We will install Docker CE (Community Edition) on Debian Jessie. Make sure you have root access to your Debian Server. First, copy paste these lines to install necessary packages prior to Docker installation.

apt-get -y install \
  apt-transport-https \
  ca-certificates \
  curl \
  software-properties-common

Now add the key

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

Add the repository

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

Update Debian

apt update

Step 3. Install Docker

root@debian-512mb-sgp1-01:~# apt install docker-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  aufs-tools cgroupfs-mount git git-man libapparmor1 libdrm2 liberror-perl libltdl7 libnih-dbus1 libnih1 makedev
  mountall plymouth rsync
Suggested packages:
  git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki
  git-svn desktop-base plymouth-themes
The following NEW packages will be installed:
  aufs-tools cgroupfs-mount docker-ce git git-man libapparmor1 libdrm2 liberror-perl libltdl7 libnih-dbus1 libnih1
  makedev mountall plymouth rsync
0 upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
Need to get 25.0 MB of archives.
After this operation, 115 MB of additional disk space will be used.
Do you want to continue? [Y/n]

The command above will install Docker Community Edition. Wait until the installation completed.

Now check Docker status.

root@debian-512mb-sgp1-01:~# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled)
   Active: active (running) since Tue 2017-05-16 05:16:35 UTC; 24s ago
     Docs: https://docs.docker.com
 Main PID: 15797 (dockerd)
   CGroup: /system.slice/docker.service
           ├─15797 /usr/bin/dockerd -H fd://
           └─15800 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-inter...

May 16 05:16:35 debian-512mb-sgp1-01 dockerd[15797]: time="2017-05-16T05:16:35.421493932Z" level=info msg="Defa...ess"
May 16 05:16:35 debian-512mb-sgp1-01 dockerd[15797]: time="2017-05-16T05:16:35.466317132Z" level=info msg="Load...ne."
May 16 05:16:35 debian-512mb-sgp1-01 dockerd[15797]: time="2017-05-16T05:16:35.491611327Z" level=info msg="Daem...ion"
May 16 05:16:35 debian-512mb-sgp1-01 dockerd[15797]: time="2017-05-16T05:16:35.491668143Z" level=info msg="Dock...1-ce
May 16 05:16:35 debian-512mb-sgp1-01 systemd[1]: Started Docker Application Container Engine.
May 16 05:16:35 debian-512mb-sgp1-01 dockerd[15797]: time="2017-05-16T05:16:35.504577327Z" level=info msg="API ...ock"
May 16 05:16:35 debian-512mb-sgp1-01 systemd[1]: [/lib/systemd/system/docker.service:24] Unknown lvalue 'Delega...ice'
May 16 05:16:35 debian-512mb-sgp1-01 systemd[1]: [/lib/systemd/system/docker.service:24] Unknown lvalue 'Delega...ice'
May 16 05:16:35 debian-512mb-sgp1-01 systemd[1]: [/lib/systemd/system/docker.service:24] Unknown lvalue 'Delega...ice'
May 16 05:16:35 debian-512mb-sgp1-01 systemd[1]: [/lib/systemd/system/docker.service:24] Unknown lvalue 'Delega...ice'
Hint: Some lines were ellipsized, use -l to show in full.

If its not running, you can execute the following command

systemctl start docker
systemctl enable docker

Thanks for reading this how to install Docker on Debian 8.8 Jessie. I hope it can be useful for anyone.

Be the first to comment

Leave a Reply