ARM-docker compose离线安装
·
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 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
3.将 docker-compose 文件复制到 /usr/local/bin/ 目录下,并重命名为 docker-compose
cp docker-compose-linux-aarch64 /usr/local/bin/docker-compose
4.设置 docker-compose 文件权限
chmod +x /usr/local/bin/docker-compose
5.将 docker.service 移到 /etc/systemd/system/ 目录
cp docker.service /etc/systemd/system/
6.设置 docker.service 文件权限
chmod +x /etc/systemd/system/docker.service
7.重新加载配置文件
systemctl daemon-reload
8.启动docker
systemctl start docker
9.设置 docker 开机自启
systemctl enable docker.service
10.查看是否安装成功
docker-compose -v
inference:
https://blog.csdn.net/qq_23845083/article/details/130768859
更多推荐

所有评论(0)