Linux Tutorial-How to install Docker CE on Debian 9

On this Debian Tutorial, I am going to show you how to install Docker CE on Debian 9. Docker CE is community edition of Docker which is free for use. If you are new to Docker, please read this post to learn more about Docker technology. Docker CE is easy to set up and install. It supports various distributions such as Debian, Fedora, Ubuntu and derivatives.

How to install Docker CE on Debian 9

Todays developer focus on build and distributed their application using Docker. You can easily deploy a web server using Docker, MySQL Server on Docker, Owncloud on Docker and many more. You can check thousands of dockerized application on Docker Store.

How to install Docker CE on Debian 9

The following commands must be run as root. I am not using sudo, so make sure you are root.

Step 1. Update your system

apt update && apt upgrade

Step 2. Setup the repository

Install additional packages

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

Add the GPG Key

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

Add the Docker repository

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

Step 3. Install Docker CE

apt update && apt install docker-ce

In few moments, Docker should be installed. You can check the Docker service using this command:

systemctl status docker

Run/Stop Docker service

systemctl start docker
systemctl stop docker

 

Admin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.