How to install Docker on Debian 9

This tutorial will show you how to install Docker on Debian 9 Stretch. Many things can be done with Docker power. Installing Docker on Debian 9 is pretty easy. The new Docker now supports Debian 9 Stretch, so we can install it via repository.

install docker on debian 9

Steps to install Docker on Debian 9

Step 1. Update system

apt update && apt upgrade

Step 2. Install required packages

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

Output sample

root@debian:/etc/apache2/sites-available# sudo apt-get install \
>      apt-transport-https \
>      ca-certificates \
>      curl \
>      gnupg2 \
>      software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apt-transport-https is already the newest version (1.4.6).
ca-certificates is already the newest version (20161130+nmu1).
ca-certificates set to manually installed.
The following additional packages will be installed:
  gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 libcap2-bin libdbus-glib-1-2 libgirepository-1.0-1 libglib2.0-bin
  libgstreamer1.0-0 libpackagekit-glib2-18 libpam-cap libpolkit-agent-1-0 libpolkit-backend-1-0
  libpolkit-gobject-1-0 packagekit packagekit-tools policykit-1 python3-dbus python3-gi python3-software-properties
  unattended-upgrades
Suggested packages:
  gstreamer1.0-tools appstream python-dbus-doc python3-dbus-dbg bsd-mailx needrestart
The following NEW packages will be installed:
  curl gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 gnupg2 libcap2-bin libdbus-glib-1-2 libgirepository-1.0-1
  libglib2.0-bin libgstreamer1.0-0 libpackagekit-glib2-18 libpam-cap libpolkit-agent-1-0 libpolkit-backend-1-0
  libpolkit-gobject-1-0 packagekit packagekit-tools policykit-1 python3-dbus python3-gi python3-software-properties
  software-properties-common unattended-upgrades
0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,345 kB of archives.
After this operation, 14.9 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Step 3. Add GPG Key

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

Step 4. Setup repository

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

Step 5. Update and install Docker CE

apt update
apt install docker-ce

 

1 Comment

4 Trackbacks / Pingbacks

  1. Install Emby Server on Debian 9 using Docker - Free Linux Tutorials
  2. How to install Onlyoffice Community Server on Debian 9 - Free Linux Tutorials
  3. La debian stretch | /home/GNU/Linux/Ramix
  4. How to Install Docker CE on OpenSUSE Leap 42.3 | Manjaro dot site

Leave a Reply

Your email address will not be published.


*