中标麒麟Docker离线安装x86

编程教程 > Linux (75) 2024-11-26 14:39:04

一、下载安装包

通过命令 uname -a 查看当前系统架构本次架构为x86-64,故此下载x86-64版本docker

本次安装选择20.10.9

Index of linux/static/stable/x86_64/

中标麒麟 docker安装x86_图示-22f112701aa2490cacffb63614409d0b.png

二、安装

2.1安装docker

上传下载后的压缩包到Linux系统/opt目录,然后解压

tar -xzf docker-20.10.9.tgz 

解压后得到docker目录,将docker目录里面所有移动到/usr/bin/目录(必须)后面的配置写了绝对路径

mv docker/* /usr/bin/

2.2注册docker.service服务

vi /usr/lib/systemd/system/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

给文件添加可执行权限并重载daemon

chmod +x /usr/lib/systemd/system/docker.service
systemctl daemon-reload

2.3配置docker镜像源(可选操作)

vi /etc/docker/daemon.json

#找一个阿里云的私库或其他

{
 "registry-mirrors": ["https://xxx.mirror.aliyuncs.com"]
}

配置后重载daemon

systemctl daemon-reload

 

2.4关闭防火墙(根据安装的docker版本可选)【本次安装未停用防火墙】

Docker与Firewalld冲突怎么办?教你几招搞定docker网络_docker firewalld 一文中说明docker版本高于20.10.0可与firewall共存

systemctl disable firewalld
chkconfig iptables off

 

2.5启动docker

systemctl start docker.service

2.6设置开机自启动

systemctl enable docker.service

2.7查看docker状态

systemctl status docker.service
中标麒麟 docker安装x86_图示-0e173933a6cc40908a9c2ec9563864ac.png

 

over

 


评论
User Image
提示:请评论与当前内容相关的回复,广告、推广或无关内容将被删除。

相关文章
一、下载安装包本次安装选择20.10.9Index of linux/static/stable/x86_64/二、安装上传下载后的压缩包到Linux系统/op
Ubuntu 系统安装DockerUbuntu 在线安装 Docker-XQLEE'Blog (在线安装,需外网好)Ubuntu 安装Docker 国内适用-X
安装篇国外:curl -fsSL https://get.docker.com | bash国内:curl -fsSL https://get.docker.com | bash -s dock...
Docker安装部署Redisdocker 安装部署Redis环境Linux系统dockerdocker-compose 相关文章:Ubuntu 在线安装 Docker-xqlee (blog....
下载harbor离线版打开GitHub上的harbor仓库地址https://github.com/goharbor/harbor/下载最新稳定离线版本上传harbor到服务器服务器创建目录/o...
不知从何时开始,get.docker.com download.docker.com 在腾讯云已经无法访问了,导致之前分享的在线安装方案间接失效,故此记录国内Ubuntu 安装docker的另一种方法
CentOS 7 安装最新Docker-ce# 配置repo源 默认repo源没有docker-ce安装包,需要新的repo源安装依赖库,yum-utils 提供命令"yum-config-ma...
添加docker-ce的yum源实际上,添加的这个yum源仍然是el7的yum install -y yum-utils yum-config-manager --add-repo htt...
安装docker和docker-compose参考文章:CentOS 8.0-8.4 yum 安装docker-ce-xqlee (blog.xqlee.com)Ubuntu 在线安装 Dock...
前置条件Docker 环境开始安装redis-stack打开docker官方hub的地址 redis/redis-stack Tags | Docker Hub
安装好dockerDocker 安装参考: 配置Docker是用普通用户以ubuntu用户来运行dockersudo chown ubuntu:ubuntu /
eolinker 开源版5 PHP版Docker部署eolinker Docker部署准备工作docker 服务docker-compose组件eolinker开源版5关联文章:Ubuntu 在...
一. Docker-Compose 简介1. Docker-Compose 简介Docker-Compose项目是Docker官方的开源项目,负责实现对Docker容器集群的快速编排。Docke...
snap 简介如果你在使用 Ubuntu 18.04/20.04 LTS 版本的 Ubuntu 系统,会发现系统里面多了一个应用格式包—— .snap 包。 S
Docker swarm 集群NFS共享目录 NFS 主机安装服务端服务端安装命令如下:sudo apt install nfs-kernel-server -yNFS服务端安装 服务端配置NF...