Classified articles under docker

This is really an Indian bug, 🤮 The directory cannot be deleted

 rm: can't remove XXX: No such file or directory

After searching through the docker's documents and issues, this seems to be related to the ftype of the XFS partition. According to other people's solutions, it can't be solved 🤮 Yes

In the end, it's better to reduce two versions. Of course, it's OK to reload the system Dafa

Direct use is not recommended here sudo yum install -y docker-ce To install docker, the docker version of CentOS with its own source will be relatively old, or it may not exist at all

What I'm talking about here is that CentOS Linux release 7.4.1708 (Core) Operating in the environment of, theoretically centos7 currency

0. Preparation operation

For the operation recommended by the government, delete the old docker related software existing in the computer first

 sudo yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine

Install the necessary tools

 sudo yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2

Add docker's own official source

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

At this point, of course, you can use it sudo yum install docker-ce The latest docker community version is installed. If you have special requirements or don't want to use the latest edge version, you can continue to read

1. Start

All operations here regard you as the first installation of docker

use yum list docker-ce --showduplicates | sort -r View the version number of the current docker community version and select Install

 #This is the relevant version information when I wrote this article 
 docker-ce.x86_ 64            17.11.0.ce-1.el7.centos             @docker-ce-edge
docker-ce.x86_ 64            17.09.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_ 64            17.06.2.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_ 64            17.06.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_ 64            17.06.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_ 64            17.03.2.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_ 64            17.03.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_ 64            17.03.0.ce-1.el7.centos             docker-ce-stable

The first column is Package name
The second column is Version name
The third column is Identification stability or testing

Of course, we can't install the guy in the first line today, at least we can install those under the first line

We need to put the listed information into the package name for installation

Take the second line

 docker-ce.x86_ 64            17.09.0.ce-1.el7.centos             docker-ce-stable

Package name = first half of the first column point number + '-' + second column

Intermediate use - connect

The package name is soy sauce purple docker-ce-17.09.0.ce-1.el7.centos

Now you can start installing

 sudo yum install docker-ce-17.09.0.ce-1.el7.centos

。。。 Waiting for the installation to be completed, a long installation process (the installation time will vary depending on the machine performance and configuration)

After installation, you can perform the following operations

 #Enable docker 
 sudo systemctl start docker 
 add boot start (optional) 
 sudo systemctl enable docker

Try docker?

 #Check whether the version information is consistent with that of the installation

Normal execution, output is OK

PS: if you don't use it root Add the current user to the docker group and log in to the docker group

 #Create the docker user group sudo groupadd docker to add the current user to the docker group, and $user is the user's environment variable sudo gpasswd - a $user docker. At this time, you need to restart the docker. I don't know why reload overload configuration is invalid for docker

2. Install docker compose (optional)

I can't tell you what it's like now. After all, it's only two days after all

Here, I'll intercept the introduction to you from unknown places

Docker compose is the last part of the docker choreography service. The machine mentioned above allows users to quickly install docker on other platforms. Swarm can make the docker container run efficiently in the cluster. Compose allows users to deploy distributed applications in the cluster. In short, docker compose belongs to an "application layer" service. Users can define which container group to run which application. It supports dynamic change of applications and extends when necessary.

Official installation command, version number 1.17.0 can replace the latest, View GitHub page

 sudo curl -L https://github.com/docker/compose/releases/download/1.17.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

Modify command permissions

 sudo chmod +x /usr/local/bin/docker-compose

View version information

 docker-compose version

It's impossible to write the next one. It's almost impossible for this generation to get spicy. It's fun to play games on steam, and there are so many beautiful Da Diao Meng Mei. She talks well. I like to stir fry chicken there. What's next? It can't be spicy