Linux system installation docker, docker compose

        Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable container, and then publish it to any popular Linux or Windows operating system machine, and can also implement virtualization

        Containers use a sandbox mechanism completely, and there will be no interfaces between them. Sandbox refers to a virtual technology in the computer field, and it is mostly used in computer security technology. Security software can let it run in a sandbox first, and if it contains malicious behavior, then prohibit the further running of the program, which will not cause any harm to the system.

        Docker enables faster delivery and deployment, more efficient virtualization, easier migration and expansion, simpler management, and low CPU/memory consumption.

        docker compose is a command-line tool for defining and running multi-container Docker applications.

Install Docker

        Install Docker Engine on CentOS

        The installation will be divided into systems. This article is for the CentOS system. Other system installation commands can be found in the above link.

1. If you have installed it before, you need to delete the old version first

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

Just copy and paste them all.

2. Set up the repository

sudo yum install -y yum-utils
sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

3. Install Docker Engine

sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

 This time will be longer. Keep seeing Complete!

4. Check after installation

docker -v

The version number will appear.

or use

docker version

Both Client and Server appear, if there is only one, it is not installed. 

Install docker-compose

sudo yum install docker-compose-plugin

 Check if it is installed

docker compose version

The version number will appear.

Guess you like

Origin blog.csdn.net/h360583690/article/details/129641154
Recommended