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

A performance bug about MySQL partition tables

Table of contents 2. Stack analysis using pt-pmap...

Implement 24+ array methods in JavaScript by hand

Table of contents 1. Traversal Class 1. forEach 2...

Tutorial on upgrading from Centos7 to Centos8 (with pictures and text)

If you upgrade in a formal environment, please ba...

How to use shtml include

By applying it, some public areas of the website c...

Detailed steps to install and uninstall Apache (httpd) service on centos 7

uninstall First, confirm whether it has been inst...

Example code for implementing beautiful clock animation effects with CSS

I'm looking for a job!!! Advance preparation:...

Use of hasOwnProperty method of js attribute object

Object's hasOwnProperty() method returns a Bo...

Detailed explanation of the working principle and solution of Js modularization

Table of contents 1. Modular concept 2. Modulariz...

HTML dynamically loads css styles and js scripts example

1. Dynamically loading scripts As the demand for ...

MySQL password is correct but cannot log in locally -1045

MySQL password is correct but cannot log in local...

Turn off the AutoComplete function in the input box

Now we can use an attribute of input called autoco...

What is the use of the enctype field when uploading files?

The enctype attribute of the FORM element specifie...