Article directory
1. Check the system version and confirm the version
[root@localhost ~]# cat /etc/kylin-release
Kylin Linux Advanced Server release V10 (Sword)
Second, view the system architecture
[root@localhost ~]# uname -p
x86_64
服务器如果是鲲鹏,架构是aarch64
aarch64
Note: The system is an aarch64 architecture, and most of the images on dockerhub are under the x86_64 architecture. When using images on platforms such as dockerhub, you must pay attention to whether the architecture supports aarch64!
Kernel version, iptables version
[root@localhost ~]# uname -r
4.19.90-24.4.v2101.ky10.x86_64
[root@localhost ~]#
[root@localhost ~]# iptables --version
iptables v1.8.5 (legacy)
[root@localhost ~]#
3. Download and install docker-ce
Official website download address: https://download.docker.com/linux/static/stable/
X86 architecture installation
x86 architecture
下载安装包
wget https://download.docker.com/linux/static/stable/x86_64/docker-24.0.2.tgz
解压
tar -xvzf docker-24.0.2.tgz
移动解压出来的二进制文件到 /usr/bin 目录中
mv docker/* /usr/bin/
Configure add systemd
Edit docker's system service file
vi /usr/lib/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
Reload and restart docker
systemctl daemon-reload
systemctl restart docker
aarch64 architecture
下载安装包
wget https://download.docker.com/linux/static/stable/aarch64/docker-20.10.7.tgz
解压
tar -zxvf docker-20.10.7.tgz
移动解压出来的二进制文件到 /usr/bin 目录中
mv docker/* /usr/bin/
Configure add systemd
Edit docker's system service file
vi /usr/lib/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
Reload and restart docker
systemctl daemon-reload
systemctl restart docker
View docker details
docker info
There is no difference between the use of docker and mainstream Linux distributions under x86 (such as CentOS, Fedora, Ubuntu, Debian). It should be noted that since the CPU architecture is arm64, it is necessary to use an image that supports arm64 architecture to use it normally.
Does not support arm64 image, you can find a third-party image that supports arm64 architecture, or compile and create a mysql docker image that supports arm64 version based on the centos or alpine image on the Galaxy Kirin desktop system V10. Does not support