Ever

  • 首页
  • 系统
  • docker
  • k8s
  • 数据库
  • 运维
  • 更多
    • 其他
生活不只是眼前的苟且,还有诗和远方!
  1. 首页
  2. docker
  3. 正文

arm离线安装docker和docker-compose

2024年7月26日 328点热度 0人点赞 0条评论

1. 查看系统信息

name -a

 

2.网盘获取安装包

链接:https://pan.baidu.com/s/18DWv56wGW8xaJ9oR0Qxxuw
提取码:0124
--来自百度网盘超级会员V3的分享

 

3.安装

tar xf 包名

cd dpcker

./install.sh install

 

卸载

./install.sh uninstall

 

4.自定义安装版本

5.下载docker离线安装包

https://download.docker.com/linux/static/stable/

6.下载 docker-compose离线包

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

7.编辑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

 

8.安装docker-compose

# 进入安装文件存放目录
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

 

9.遇问题总结

10.安装完docker-compose结果没有命令缺少环境变量

which docker-compose

11.添加变量

sudo vi ~/.bashrc

export PATH=$PATH:/usr/local/bin

source ~/.bashrc

 

 

标签: 暂无
最后更新:2024年7月26日

小杜

岁月静好,现世安稳。

打赏 点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

归档

  • 2025 年 4 月
  • 2024 年 9 月
  • 2024 年 8 月
  • 2024 年 7 月
  • 2024 年 6 月
  • 2024 年 5 月
  • 2024 年 4 月
  • 2024 年 3 月

分类目录

  • docker
  • k8s
  • 数据库
  • 社交
  • 系统
  • 运维

COPYRIGHT © 2019 小杜. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang