How to Configure Docker on Alibaba Cloud ECS Instance - Rahi
Cloud Services

How to Install and Configure Docker on Alibaba Cloud ECS Instance

By Pablo Puig

May 29, 2023 - 6 min

How to Install and Configure Docker on Alibaba Cloud ECS Instance

Docker is an open-source platform from the Moby Project that helps package applications into containers and automate the deployment. You can deliver the application quickly since you can separate your applications from your infrastructure.

Docker offers two versions: Docker Community Edition (CE) and Docker Enterprise Edition (EE). Docker CE is available in the Docker Store and can run on Debian, macOS, CentOS, Windows 10, and cloud platforms. Docker EE is the premium version of Docker CE for enterprises.

Prerequisites

In this article, we suppose that you already possess an Alibaba Cloud ECS instance with the following latest image available when writing this article:

  • Ubuntu 20.04
  • Debian 9.9
  • CentOs 8.5
  • Alibaba Cloud Linux 3.2104 64-bits
  • Installing Docker

    We will show you how you can install Docker on the previous images listed above.

    Installing on Debian 9.9 and Ubuntu 20.04

    First, update the cache of the server:
    $ sudo apt update

    Set up the repository over HTTPS:
    $ sudo apt install ca-certificates curl gnupg lsb-release

    Add the official Docker GPG key:
    $ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg –dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

    Set the stable repository of Docker:

  • On Ubuntu 20.04
  • $ echo “deb [arch=$(dpkg –print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu
    $(lsb_release -cs) stable” | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

  • On Debian 9.9
  • $ echo “deb [arch=$(dpkg –print-architecture) 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

    Update the cache again:
    $ sudo apt update

    Now, you can install Docker Engine:
    $ sudo apt-get install docker-ce docker-ce-cli containerd.io

    How to Install and Configure Docker on Alibaba Cloud ECS Instance_1

    You can check if the service is running by running the following command:
    $ sudo systemctl status docker

    Add the default user to the docker group so that will not need to use the `sudo` command with docker:
    $ sudo usermod -aG docker franck

    Installing on Centos 8.5

    Install the `yum-utils` package to have the `yum-config-manager`:
    $ sudo yum install -y yum-utils

    Install the docker stable repository with the `yum-config-manager` utility:
    $ sudo yum-config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo

    Install docker-engine:
    $ sudo yum install docker-ce docker-ce-cli containerd.io

    How to Install and Configure Docker on Alibaba Cloud ECS Instance_2

    Start the docker service:
    $ sudo systemctl start docker

    Check if the service has started properly:
    $ sudo systemctl status docker

    Add your user to the docker group:
    $ sudo usermod -aG docker franck

    Installing on Alibaba Cloud Linux 3

    Add the DNF repository of Docker-CE:
    $ sudo dnf config-manager –add-repo=https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

    Install the Docker-CE package:
    $ sudo dnf -y install docker-ce –nobest

    How to Install and Configure Docker on Alibaba Cloud ECS Instance_3

    Make sure to start the docker service:
    $ sudo systemctl start docker

    Don’t forget to add your Linux user to the docker group:
    $ sudo usermod -aG docker franck

    Note: When you install docker without adding your user to the docker group, you will need to use the `sudo` command to run any docker command every time. That is why in all steps, we remember you to add your user to the docker group.

    How Rahi Can Support Businesses Adopt Alibaba Cloud

    We are a global IT solutions provider that has extensive experience helping businesses adopt Alibaba Cloud.
    Our team of experts can provide a range of services to support your adoption of the Alibaba Cloud platform, including:

  • Cloud Assessment and Planning: Our experts can comprehensively assess your IT environment and business requirements to determine the best strategy for adopting Alibaba Cloud.
  • Cloud Migration: Our team can help you migrate your existing applications and data to Alibaba Cloud, ensuring a smooth and efficient transition.
  • Managed Services: We provide ongoing managed services to ensure that your Alibaba Cloud environments are optimized for performance and security and that any issues are quickly resolved.
  • Our team has already helped many Western companies successfully adopt and integrate Alibaba Cloud, and we can also bring that expertise to your business. With Our support, you can leverage the power of Alibaba Cloud to drive your digital transformation and grow your business.

    Author

    • Pablo is an IT professional specializing in cloud computing technologies for the past 7 years. With a special focus into the China market and the Chinese technologies, he has been supporting international businesses on their cloud journey to China. Pablo has received multiple awards and recognitions from AWS, Alibaba Cloud, and Tencent Cloud for his knowledge and success delivering solutions to customers.

    , Global Director of Cloud Solutions

    Cloud Services
    Jun 16,2023
    Cross-border Network Acceleration Solutions for China

    For many international businesses with a presence in China, network stability issues are often the biggest concern...

    Cloud Services
    Jun 14,2023
    ARNs and Endpoints in AWS China

    AWS China comprises 2 AWS regions, Beijing and Ningxia, with 6 availability zones in total. Beijing is operated by...

    Cloud Services
    Jun 09,2023
    Multi-Account Strategy in AWS China

    AWS China announced the availability of AWS Organizations in the Beijing and Ningxia regions in 2020. Before we deep...

    Cloud Services
    Jun 07,2023
    Azure Global vs Azure China: Services Comparison

    Microsoft Azure is a cloud computing platform and infrastructure created by Microsoft for building, deploying, and...

    Cloud Services
    Jun 06,2023
    How to deploy an AWS Marketplace AMI in AWS China

    The AWS Marketplace China is an online platform operated by AWS China that covers products in both AWS China regions...

    Cloud Services
    Jun 02,2023
    Azure China: Factors to Consider

    Microsoft Azure is a popular cloud computing platform that offers various services to support organizations in various...

    Cloud Services
    May 31,2023
    AWS Global vs AWS China: Services Comparison

    Amazon Web Services (AWS) is a cloud computing platform that provides a wide range of services for building,...

    Cloud Services
    May 26,2023
    How to Create a Microsoft Azure Account in China

    Azure China is independently operated and transacted by 21Vianet. Microsoft Azure services are running in 6 regions in...

    Cloud Services
    May 24,2023
    How to Create an AWS Account in China

    AWS China is independently operated and transacted by two local partners: Sinnet and NWCD. AWS services are running in...

    Cloud Services
    May 23,2023
    Understanding Alibaba Cloud Container Service for Kubernetes (ACK)

    Running containerized applications in the cloud is no longer optional but a requirement. Given the elasticity and...

    Cloud Services
    May 19,2023
    Pros and Cons of Azure China

    Microsoft Azure is a cloud computing platform and infrastructure created by Microsoft for building, deploying, and...

    Cloud Services
    May 17,2023
    Pros and Cons of AWS China

    Amazon Web Services (AWS) is a cloud computing platform that offers a wide range of services such as computing,...

    Cloud Services
    May 15,2023
    How to book a Tencent Cloud Certification Exam

    Follow the next steps to book a Tencent Cloud certification exam: 1. Sign up directly on Kryterion through this...

    Cloud Services
    May 12,2023
    Multi-Account Strategy in Alibaba Cloud

    Adopting an Alibaba Cloud multi-account strategy can provide many benefits without a lot of extra effort. Alibaba...

    Cloud Services
    Apr 06,2023
    AWS China Challenges, Risks & Issues

    Amazon Web Services (AWS) is one of the most widely used cloud computing platforms globally. With its extensive range...

    Cloud Services
    Apr 10,2023
    Azure China: Challenges, Risks & Issues

    Microsoft Azure is one of the leading cloud computing platforms in the world, offering businesses and organizations a...

    Cloud Services
    Apr 04,2023
    Azure China: Regions and Availability Zones

    Azure maintains multiple geographies to anticipate disaster recovery and data residency boundaries across its regions....

    Cloud Services
    Mar 31,2023
    AWS China: Regions and Availability Zones

    AWS is the biggest cloud provider worldwide constantly improving its platform and expanding its services globally....

    Cloud Services
    Mar 30,2023
    Tencent Cloud Global Infrastructure

    Tencent Cloud is one of China’s biggest public cloud service providers leveraging its global infrastructure to...

    Cloud Services
    Mar 28,2023
    Alibaba Cloud Global Infrastructure

    Alibaba Cloud was named by IDC as the world’s fastest-growing provider in the global public cloud market. Global...

    Cloud Services
    Mar 24,2023
    Differences between Azure Global and Azure China

    Microsoft Azure China was officially launched in 2014 and was the first international public cloud provider to bring...

    Cloud Services
    Mar 23,2023
    Differences between AWS global and AWS China

    AWS Global and AWS China are two different regions that provide similar but different services to their respective...

    Cloud Services
    Mar 21,2023
    Complete Guide to Tencent Cloud

    People are now technologically so advanced and innovative, new groundbreaking ideas have brought visible changes in...

    Cloud Services
    Mar 20,2023
    Complete Guide to Alibaba Cloud

    Alibaba Cloud, also known as Aliyun, is a Chinese cloud computing company, which was officially launched in 2009....

    Cloud Services
    Mar 16,2023
    Complete Guide to Microsoft Azure China

    Microsoft Azure is a cloud computing service provider for building, testing, deploying, and managing applications and...

    Cloud Services
    Mar 14,2023
    Complete Guide to Amazon Web Services (AWS) China

    Amazon Web Services (AWS) is a cloud-based platform that provides a reliable and cost-effective infrastructure to...

    Cloud Services
    Mar 12,2023
    Managed Cloud Services in China: Advantages and Opportunities

    Managed Cloud Services in China: Advantages and Opportunities As the Global Director of Cloud Solutions, I have seen...

    Cloud Services
    Mar 10,2023
    Managing Cloud Operations in China

    Managing Cloud Operations in China: Centralization or Localization? A Cloud Center of Excellence (CCOE) is a team that...

    Cloud Services
    Mar 03,2023
    Hybrid Cloud in China

    Hybrid cloud is a combination of public and private cloud services that are used together to provide the best possible...

    Cloud Services
    Mar 02,2023
    Cloud Migration in China: A Comprehensive Guide

    The use of Cloud Computing is rapidly growing in China, with more and more companies shifting their operations to the...

    Cloud Services
    Feb 17,2023
    Supporting European Companies on their Cloud Journey to China

    Supporting European Companies on Their Cloud Journey to China The cloud computing market in China is growing rapidly,...

    Cloud Services
    Feb 15,2023
    Supporting US Companies on Their Cloud Journey to China

    The cloud computing market in China has been growing rapidly, with an estimated growth rate of over 20% annually. As a...

    Cloud Services
    Feb 10,2023
    Cloud Hosting in China: A Comprehensive Guide

    Cloud hosting has been a transformative technology for businesses around the world. It has allowed companies of all...

    Cloud Services
    Feb 10,2023
    Get Your Cloud Accounts in China

    Getting a cloud account globally takes minutes, in China it can take up to months. It is not straight-forward and not...

    Cloud Services
    Feb 03,2023
    Adoption of Public Cloud in China

    Public Cloud Adoption in China Cloud strategy is defined as a business plan to adopt cloud technologies into the...

    Cloud Services
    Jan 31,2023
    Cloud Services Providers in China

      Cloud Services Providers in China When entering the Chinese cloud market, one of the first decisions is to...

    Cloud Services
    Jan 27,2023
    China’s Cloud Computing Market

    Cloud Computing in China China has done tremendous development and has succeeded to digitize its business system with...

    Get in touch with our experts for a free 30-minute strategy
    consultation

    Let our experts design, develop, deploy and manage your requirements while you focus on what's important for your business

    Book a Consultation
    error: Content is protected !!