麒麟V10,arm64,离线安装docker和docker-compose

文章目录

需要在离线环境的系统了里面安装docker。目前国产化主推的是麒麟os和鲲鹏的cpu,这块的教程还比较少,记录一下。

复制代码
# cat /etc/kylin-release
Kylin Linux Advanced Server release V10 (Sword)

一、下载

1.1 docker

下载docker二进制文件链接,我下载的是docker-20.10.7.tgz

1.2 docker-compose

直接去github上面下载即可

1.3 docker.service

第三个文件名字就叫做docker.service把下面的内容全部复制进去

bash 复制代码
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
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s

[Install]
WantedBy=multi-user.target

二、安装

现在就按照下面的指令一步一步敲就行了参考

bash 复制代码
# 进入安装文件存放目录
cd /home/soft

# 解压 docker 到当前目录
tar -xvf docker-20.10.7.tgz

# 将 docker 文件移动到 /usr/bin 目录下
cp -p docker/* /usr/bin

# 将 docker-compose 文件复制到 /usr/local/bin/ 目录下,并重命名为 docker-compose
cp docker-compose-linux-aarch64 /usr/local/bin/docker-compose

# 设置 docker-compose 文件权限
chmod +x /usr/local/bin/docker-compose

# 将 docker.service 移到 /etc/systemd/system/ 目录
cp docker.service /etc/systemd/system/

# 设置 docker.service 文件权限
chmod +x /etc/systemd/system/docker.service

# 重新加载配置文件
systemctl daemon-reload

# 启动docker
systemctl start docker

# 设置 docker 开机自启
systemctl enable docker.service

三、验证安装成功

3.1 docker

bash 复制代码
# docker -v
Docker version 20.10.7, build f0df350

3.2 docker-compose

bash 复制代码
# docker-compose -v
Docker Compose version v2.17.2

可能要重启一下终端,我是没重启就直接成功了。

相关推荐
czhc114007566318 小时前
Linux 830 shell:expect,ss -ant ,while IFS=read -r line,
linux·运维·r语言
滴滴滴嘟嘟嘟.19 小时前
嵌入式Linux驱动开发:蜂鸣器驱动
linux·运维·驱动开发
hit56实验室19 小时前
腾讯云的运维笔记——从yum的安装与更新源开始
运维·笔记·腾讯云
atomLg19 小时前
k8s故障排查总结
云原生·容器·kubernetes
小阳睡不醒19 小时前
小白成长之路-k8s原理(二)
云原生·容器·kubernetes
Hello.Reader19 小时前
用 Docker 玩转 Kafka 4.0镜像选型、快速起步、配置持久化与常见坑
docker·容器·kafka
成都极云科技20 小时前
裸金属服务器与虚拟机、物理机的核心差异是什么?
运维·服务器·数据库
我命由我1234521 小时前
Word - Word 查找文本中的特定内容
运维·经验分享·笔记·word·运维开发·文档·文本
计算机小手21 小时前
内网穿透系列十二:一款基于 HTTP 传输和 SSH 加密保护的内网穿透工具 Chisel ,具备抗干扰、稳定、安全特性
经验分享·网络协议·安全·docker·开源软件
IDC02_FEIYA21 小时前
服务器托管多少钱一年?服务器托管收费标准
运维·服务器