ARM-docker compose离线安装
2026/6/30 23:20:24 网站建设 项目流程

ARM架构docker compose离线安装
1.下载
github:

https://github.com/docker/compose/releases

CSDN:

https://download.csdn.net/download/qq_23845083/87800369

下载对应架构(考虑docker和docker compose的版本兼容性,可以选择相近的发布时间):

2.准备 docker.service系统配置文件
(复制以下内容保存为 docker.service 文件,一定是要全部,包括最上面的 docker.service !!!)

docker.service[Unit]Description=Docker Application Container EngineDocumentation=https://docs.docker.comAfter=network-online.target firewalld.serviceWants=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 dockerExecStart=/usr/bin/dockerdExecReload=/bin/kill-sHUP$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=infinityLimitNPROC=infinityLimitCORE=infinity# Uncomment TasksMax if your systemd version supports it.# Only systemd 226 and above support this version.#TasksMax=infinityTimeoutStartSec=0# set delegate yes so that systemd does not reset the cgroups of docker containersDelegate=yes# kill only the docker process, not all processes in the cgroupKillMode=process# restart the docker process if it exits prematurelyRestart=on-failureStartLimitBurst=3StartLimitInterval=60s[Install]WantedBy=multi-user.target

3.将 docker-compose 文件复制到 /usr/local/bin/ 目录下,并重命名为 docker-compose

cpdocker-compose-linux-aarch64 /usr/local/bin/docker-compose

4.设置 docker-compose 文件权限

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

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

cpdocker.service /etc/systemd/system/

6.设置 docker.service 文件权限

chmod+x /etc/systemd/system/docker.service

7.重新加载配置文件

systemctl daemon-reload

8.启动docker

systemctl startdocker

9.设置 docker 开机自启

systemctlenabledocker.service

10.查看是否安装成功

docker-compose-v

inference:

https://blog.csdn.net/qq_23845083/article/details/130768859

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询