How to install Docker using scripts under Linux Centos

How to install Docker using scripts under Linux Centos

What is the main function of Docker?

At present, Docker has at least the following application scenarios:
1) Testing: Docker is very suitable for testing and release. After Docker is packaged, it can be directly provided to testers for running. Testers no longer need to cooperate with operation and maintenance and development to build and deploy the environment.
2) Test data separation: During testing, it is often necessary to modify dependent database data or clear cached data in memcache and Redis due to changes in test scenarios. Compared with traditional virtual machines, Docker is lighter and more convenient. It is easy to separate this data into different images and switch them at any time according to different needs.
3) Development: Developers use the same Docker image together, and the modified source code is mounted to the local disk. You no longer have to worry about different program behaviors caused by different environments, and new employees can quickly establish a development and compilation environment when they arrive.
4) PaaS cloud service: Docker can support command line encapsulation and programming. Through automatic loading and service self-discovery, it is very convenient to expand the services encapsulated in the Docker image into cloud services. Services like Doc conversion preview are encapsulated in the image, and the number of running containers can be increased or decreased at any time according to business requests, adapting to demand.
The specific application of Docker technology in the testing field can be reflected in:
1) Quickly build a compatibility test environment. From the characteristics of Docker's image and container technology, it can be foreseen that when the application under test requires to be fully verified in the combined environment of various Web servers, middleware, and databases, the basic Docker image can be used to quickly create various containers, load the corresponding technical components and quickly start running, which saves testers a lot of time spent on setting up the test environment.
2) Quickly build a complex distributed testing environment
Docker's lightweight virtualization feature means that it can easily build a container environment with hundreds or thousands of distributed nodes on a single machine (even a tester's laptop), thereby simulating a distributed and complex test environment that previously required a lot of time and machine resources to build.
3) Continuous Integration
Docker can quickly create and revoke containers, and in a continuous integration environment, deployment and verification can be performed frequently and quickly.

Let's take a look at how to install Docker using a script under Linux Centos. The details are as follows

1. Log in to Centos using sudo or root privileges

2. Ensure that the yum package is updated to the latest

sudo yum update

3. Execute the Docker installation script

# Executing this script will add the docker.repo source and install Docker
yum install curl -y
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

4. Start the Docker process

sudo systemctl start docker

5. Verify that Docker is installed successfully and execute a test image in the container

sudo docker run hello-world
docker ps

6. Remove Docker CE

sudo yum remove docker-ce
sudo rm -rf /var/lib/docker

This is the end of this article about how to install Docker using scripts under Linux CentOS. For more relevant content about installing Docker using scripts, 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 steps to install Docker on CentOS7
  • How to install Docker on CentOS
  • Install Docker on CentOS 7
  • Detailed tutorial on installing Docker on CentOS 8
  • Detailed tutorial on installing Docker on CentOS 8.4
  • The most detailed method to install docker on CentOS 8
  • About the problem of offline installation of Docker package on CentOS 8.4
  • Install Docker on Centos7 (2020 latest version available, just copy and paste)
  • Detailed explanation of configuring Docker's yum source and installing it in CentOS7
  • Detailed tutorial on installing Docker on CentOS 7.5
  • Install a specific version of Docker for CentOS

<<:  Understanding JavaScript prototype chain

>>:  Two methods of restoring MySQL data

Recommend

The top fixed div can be set to a semi-transparent effect

Copy code The code is as follows: <!DOCTYPE ht...

Summarize several common ranking problems in MySQL

Preface: In some application scenarios, we often ...

Pure CSS to modify the browser scrollbar style example

Use CSS to modify the browser scroll bar style ::...

Detailed explanation of Linx awk introductory tutorial

Awk is an application for processing text files, ...

Detailed explanation of the process of installing MySQL on Ubuntu 18.04.4

Let's take a look at the process of installin...

A brief introduction to Linux performance monitoring commands free

When the system encounters various IO bottlenecks...

What is web design

<br />Original article: http://www.alistapar...

How to solve the problem of margin overlap

1. First, you need to know what will trigger the v...

JavaScript to achieve uniform animation effect

This article example shares the specific code for...

Docker port mapping and external inaccessibility issues

The Docker container provides services and listen...

How to reset the root password in mysql8.0.12

After installing the database, if you accidentall...

Introducing ECharts into the Vue project

Table of contents 1. Installation 2. Introduction...

How to mount a new disk on a Linux cloud server

background A new server was added in the company,...