Galaxy Kirin V10 under Feiteng arm server, install docker using yum


General idea:
First, check whether the existing software source can install docker;
See how to install Centos;
Centos needs to be installed according to aarch64;
Use domestic image to facilitate installation;

1. View version

There are two ways to determine the specific centos version corresponding to the Kirin system. At present, there is no good way to determine the specific centos version.

uname -a
Linux kylin-node1 4.19.90-23.8.v2101.ky10.aarch64 #1 SMP Mon May 17 17:07:38 CST 2021 aarch64 aarch64 aarch64 GNU/Linux

cat /proc/version 
Linux version 4.19.90-23.8.v2101.ky10.aarch64 (KYLINSOFT@localhost.localdomain) (gcc version 7.3.0 (GCC)) #1 SMP Mon May 17 17:07:38 CST 2021

1.1 add software source

Software source has been mentioned in previous articles

vi /etc/apt/source.list

Add in

deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.0 main restricted universe multiverse

Use the following command to update the software source

yum update
ls /etc/yum.repos.d/

Confirm that Yum config manager is available. If not, use the following command to install

yum install -y yum-utils   device-mapper-persistent-data   lvm2
yum-config-manager -h

1. 2 yum commands for installing docker

The following command is a command that has been tried all the time. In each modification step, try to use the following command to confirm whether it can be installed until it succeeds. Anyway, the official source of Galaxy Kirin can't be used successfully.

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

2. Installation warehouse

Recently, I was annoyed by the Alibaba incident. I wanted to use Tsinghua source, but the repo address in Tsinghua source is still docker Hub address, silently switching to Ali's warehouse.

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

However, the current centos version needs to be identified in this source. Because we use the Kirin system, we need to manually enter the version number. Replace the $releasever in front of basearch with 7 (I don't know the specific centos version, the estimated version, and there are some risks)

vi /etc/yum.repos.d/docker-ce.repo

Examples are as follows:

https://mirrors.aliyun.com/docker-ce/linux/centos/7/$basearch/stable
enabled=1

2.1 install the missing dependent container SELinux

Use the previous command in 1.2 to remind you of the lack of container SELinux. This image is in the warehouse. It should be noted that Tsinghua's warehouse centos has three warehouses. You need to select centos altarch to find the package compiled with arm architecture.
Download the package below and select a less advanced version

wget https://mirrors.tuna.tsinghua.edu.cn/centos-altarch/7/extras/aarch64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm

Fortunately, you can install the dependency using yum. After the installation is completed, rpm installs the package downloaded above.

yum install policycoreutils-python
rpm -ivh container-selinux-2.107-1.el7_6.noarch.rpm

2.2 install the missing dependencies slirp4netns and fuse overlay FS

Download in Tsinghua warehouse

     wget https://mirrors.tuna.tsinghua.edu.cn/centos-altarch/7/extras/aarch64/Packages/slirp4netns-0.4.3-4.el7_8.aarch64.rpm
     wget https://mirrors.tuna.tsinghua.edu.cn/centos-altarch/7/extras/aarch64/Packages/fuse-overlayfs-0.7.2-6.el7_8.aarch64.rpm

slirp4netns is successfully installed at one time. Fuse overlay FS requires libfuse3 So support. I thought it was necessary to compile and install. After trying many times, use yum to install.

rpm -ivh slirp4netns-0.4.3-4.el7_8.aarch64.rpm 
yum install fuse3
rpm -ivh fuse-overlayfs-0.7.2-6.el7_8.aarch64.rpm 

3. Docker installation

Execute the command in 1.2 again.

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


Last metadata expiration check: 1:19:24 ago on 2021 Saturday, August 14, 2006 16:10:45.
Dependencies resolved.
==============================================================================================
 Package                        Architecture Version              Repository             Size
==============================================================================================
Installing:
 containerd.io                  aarch64      1.4.9-3.1.el7        docker-ce-stable       23 M
 docker-ce                      aarch64      3:20.10.8-3.el7      docker-ce-stable       15 M
 docker-ce-cli                  aarch64      1:20.10.8-3.el7      docker-ce-stable       25 M
Installing dependencies:
 docker-ce-rootless-extras      aarch64      20.10.8-3.el7        docker-ce-stable      7.3 M
 libcgroup                      aarch64      0.41-23.ky10         ks10-adv-os            98 k

Transaction Summary
==============================================================================================
Install  5 Packages

Total download size: 71 M
Installed size: 314 M
Is this ok [y/N]: y

summary

The software source needs to be maintained step by step. This is a long process. I hope the domestic software will be better and better.

Keywords: Docker yum ARM

Added by Paulus Magnus on Thu, 23 Dec 2021 11:38:59 +0200