ARM架构docker离线安装步骤

ARM架构docker离线安装步骤 适用于arm架构和x86架构注意下载的docker对应正确的架构即可下载docker解压tar-zxvfdocker-26.1.3.tgz将解压的文件复制到/usr/bin/路径下cpdocker/* /usr/bin/编辑文件vim/etc/systemd/system/docker.service添加如下内容[Unit]DescriptionDocker Application Container EngineDocumentationhttps://docs.docker.comAfternetwork-online.target firewalld.serviceWantsnetwork-online.target[Service]Typenotify# 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/dockerd-Hunix:///var/run/docker.sock --selinux-enabledfalse --default-ulimitnofile65536:65536ExecReload/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.LimitNOFILEinfinityLimitNPROCinfinityLimitCOREinfinity# Uncomment TasksMax if your systemd version supports it.# Only systemd 226 and above support this version.#TasksMaxinfinityTimeoutStartSec0# set delegate yes so that systemd does not reset the cgroups of docker containersDelegateyes# kill only the docker process, not all processes in the cgroupKillModeprocess# restart the docker process if it exits prematurelyRestarton-failureStartLimitBurst3StartLimitInterval60s[Install]WantedBymulti-user.target5.添加文件可执行权限chmodx /etc/systemd/system/docker.service6.配置成功后重新加载 daemon 服务systemctl daemon-reload7.启动 docker 服务systemctl startdocker8.查看 docker 服务的运行状态systemctl statusdocker查看docker版本docker--version【其他】1.如果执行docker --version但是显示docker 命令找不到1.查找 docker 命令位置sudofind/-namedocker2/dev/null如果能找到类似/usr/local/bin/docker 或 /usr/bin/docker就把它加到 PATHexport PATH$PATH:/usr/bin/docker2vi ~/.bashrc打开后添加到最后一行exportPATH$PATH:/usr/bin/docker3最后重启source~/.bashrc2.有的版本不一定支持GPU/NPU判断方式为执行命令docker run --help查看信息