How To Install Docker Engine On AWS Debian Linux Server?

The installation of Docker Engine on a Debian system is an initial step in deploying containerized applications. In this article, we explain how to perform effortless setup of Debian operating system and install Docker on top of this to adopt containerization technology. This article provides thorough step-by-step guidelines for Docker Engine installation. Understand the potential of containerization on Debian as we work through fundamental ideas and real-world applications.

Table of Content

  • What is Docker?
  • What is the Debian operating system?
  • Step-by-Step Guide: Install Docker Engine on Debian
  • Docker On Debain System – FAQ’s

What is Docker?

By providing containerization—a lightweight, portable approach that enables apps to execute effectively across diverse environments—Docker revolutionizes software deployment. Docker containers simplify the development, testing, and deployment processes by encapsulating a program and all of its dependencies in a self-contained, isolated environment.

What is the Debian operating system?

Debian is a well-known, dependable open-source operating system that is known for its stability and efficient package management system. It supports a variety of computing requirements and provides a solid foundation for both desktop and server setups. It facilitates both developers and system administrators who are looking for a flexible and safe platform. Debian is always a preferred option because of its dedication to the principles of free software and its well-maintained repository.

Step-by-Step Guide: Install Docker Engine on Debian

Firstly, let’s setup a Debian operating system on the AWS cloud platform, then go for the installation of the Docker Engine. The following is a step-by-step guide to this.

Step 1: Login to an Amazon Account

  • Navigate to the AWS account login console in your browser.
  • Login to the AWS account with your credentials.

Step 2: Navigate To EC2 Dashboard

  • After successfully login in to AWS account, Navigate to the Console home to EC2 Dashboard.
  • Click on the “Launch Instance” for creating the instance with debian operating system.

  • Provide the Name to this create instance Ex: my_debian_instance
  • Select the debian AMI image.
  • Specify the number of Instances labeled box in the right side with 1 as shown in the below screenshot.

Step 3: Configure The Network Security Groups

  • Go for the Network security groups in that page.
  • Click on edit option beside to that name.
  • Now configure the network as shown in the below figure, allow the inbound traffic, to don’t face any network issue form the AWS account side.

Note: To improve the security you can restrict the inbound traffic.

Step 4: Connect To The Instance

  • Wait till the creating instance comes from the pending state to running state.
  • Once the instance came to the running state connect to it.

Step 5: Establishing SSH connection With Local System

  • Go the ssh section in the networking section.
  • Then copy the ssh command from their.

Step 6: Update System Software

  • Open the command line in the local system and redirect to the directory where ssh key is present.
  • Now run the ssh command and establish the remote login from the local system.
  • After successful connecting with remote login, update and upgrade the system software with the following commands.
sudo apt update     
sudo apt upgrade -y

  • The below screenshot shows practical execution of above two command updating and upgrading of system software.

Step 7: Install Docker Dependencies

  • Install necessary packages for Docker installation with the following command:
sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release

Step 8: Add Docker GPG Key

  • Add Docker’s official GPG key to ensure package integrity with following command:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg \
--dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Step 9: Set up Docker Repository

  • Run the following command for configuring the Docker repository for Debian.
echo "deb [signed-by=/usr/share/keyrings/docker-archive-keyring.gpg]  \
https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Step 10: Install Docker Engine

  • Update the package index with below showing command `sudo apt update` and then install the Docker with ` sudo apt install -y docker-ce docker-ce-cli containerd.io`
     sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io

Step 11: Start and Enable Docker

  • Start the Docker service and enable it to start on boot with the following commands:
 sudo systemctl start docker
sudo systemctl enable docker

  • The below screenshot shows the starting of the docker service by executing the above command.

Step 12: Verify Installation

  • Check Docker version and run a test container with the following commands.
 docker --version

and

docker run hello-world

Your AWS Debian instance is now available with Docker Engine, allowing you to efficiently deploy and manage your containers.

Docker On Debain System – FAQ’s

How To Install Docker Engine On Debian 11?

On using following commands you can install the docker engine:

sudo apt update
sudo apt install -y docker.io
sudo systemctl enable --now docker

How To Install Docker Engine Only?

For installing only docker engine, try on executing the following commands in debian Environment:

sudo apt update
sudo apt install -y docker.io

Which Is better Debian Or Ubuntu?

The choice of choosing between Debian and Ubuntu depends on your preferences and needs. Debian is known for its stability whereas Ubuntu is choosed while considered more user-friendly with regular releases and extensive community support. Choose The OS based on your specific requirements and experience level.

Is Docker Engine And Docker Daemon The Same?

Yes, Both the terms “Docker Engine” and “Docker daemon” are commenly used interchangeably. The Docker daemon is a part of the Docker Engine and is responsible for managing Docker containers on a system.



Contact Us