Installing Alibaba Cloud Server with Docker and the pitfalls encountered in installing it in a virtual machine (summary of problems)

Installing Alibaba Cloud Server with Docker and the pitfalls encountered in installing it in a virtual machine (summary of problems)

Docker installation (Alibaba Cloud Server)

Docker official centos installation tutorial

Uninstall old versions

$ sudo yum remove docker \
         docker-client \
         docker-client-latest \
         docker-common \
         docker-latest \
         docker-latest-logrotate \
         docker-logrotate \
         docker-engine

Install using repository

Before you install Docker Engine for the first time on a new host, you need to set up the Docker repository. Afterwards, you can install and update Docker from the repository.

Setting up the repository

Install the yum-utils package (which provides yum-config-manager utility) and set up the stable repository.

$ sudo yum install -y yum-utils

$ sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

Install Docker Engine

Install the latest version of Docker Engine and containers

$ sudo yum install docker-ce docker-ce-cli containerd.io

Start Docker

$ sudo systemctl start docker

Verify that Docker Engine is installed correctly by running the hello-world image

$ sudo docker run hello-world

Uninstall Docker

Uninstall Docker Engine, CLI, and Containerd packages:

$ sudo yum remove docker-ce docker-ce-cli containerd.io

Images, containers, volumes, or custom configuration files on the host are not automatically deleted. To remove all images, containers, and volumes:

$ sudo rm -rf /var/lib/docker

You must manually delete any edited configuration files.

Install Docker on CentOS 7 virtual machine

There are many tutorials online. The blogger reported the following error message during the installation process:

Job for docker.service failed because the control process exited with error code. See “systemctl status docker.service” and “journalctl -xe” for details.

Use systemctl status docker to view detailed information.

Feb 19 15:39:43 centos7 systemd[1]: Failed to start Docker Application Container Engine.

Check the docker version, there is only client, no server

Workaround

Run vi /etc/sysconfig/selinux and change the selinux attribute value to disabled. Then restart the system; docker started successfully!

SELinux (Security-Enhanced Linux) is the implementation of mandatory access control by the National Security Agency (NSA).
It is the most outstanding new security subsystem in the history of Linux. But we generally don't use it.
Because it manages too many things, if you want to ensure security, you can use firewalls and other measures.
SELinux has three states: enforcing (executing), permissive (not executing but generating a warning),
disabled

This is the end of this article about installing Alibaba Cloud Server with Docker and the pitfalls encountered in virtual machine installation. For more information about installing Alibaba Cloud Server with Docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed process of setting up Php+Apache operating environment on Alibaba Cloud Server
  • Detailed tutorial for installing oracle19c on cloud server centos8
  • Detailed tutorial on installing Tomcat8.5 in Centos8.2 cloud server environment
  • Detailed explanation on how to install MySQL database on Alibaba Cloud Server
  • Detailed tutorial on installing MySQL database on Alibaba Cloud Server
  • Alibaba Cloud Server Tomcat cannot be accessed
  • How to open port 8080 on Alibaba Cloud ECS server
  • A brief discussion on how to choose an operating system for a cloud server

<<:  The difference between Readonly and Disabled

>>:  Detailed explanation of CSS BEM writing standards

Recommend

How to convert JavaScript array into tree structure

1. Demand The backend provides such data for the ...

How to set up Windows Server 2019 (with pictures and text)

1. Windows Server 2019 Installation Install Windo...

Summary of common Linux distribution mirror source configuration

I have been researching Linux recently and tried ...

MySQL common backup commands and shell backup scripts sharing

To back up multiple databases, you can use the fo...

A detailed introduction to Linux memory management and addressing

Table of contents 1. Concept Memory management mo...

The most common mistakes in HTML tag writing

We better start paying attention, because HTML Po...

MySQL sorting feature details

Table of contents 1. Problem scenario 2. Cause An...

In-depth understanding of Vue's method of generating QR codes using vue-qr

Table of contents npm download step (1) Import (2...

How to write beautiful HTML code

What Beautiful HTML Code Looks Like How to write ...

How to use dynamic parameters and calculated properties in Vue

1. Dynamic parameters Starting from 2.6.0, you ca...

Parsing Linux source code epoll

Table of contents 1. Introduction 2. Simple epoll...