中标麒麟Docker离线安装x86

教程分享 > Linux和Shell教程 > 博文分享 (1067) 2024-11-21 09:04:17

一、下载安装包

通过命令 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

 


相关文章
一、下载安装包本次安装选择20.10.9Index of linux/static/stable/x86_64/二、安装上传下载后的压缩包到Linux系统/op
Docker安装部署Redisdocker 安装部署Redis环境Linux系统dockerdocker-compose 相关文章:Ubuntu 在线安装 Docker-左搜 (leftso.c...
下载harbor离线版打开GitHub上的harbor仓库地址https://github.com/goharbor/harbor/下载最新稳定离线版本上传harbor到服务器服务器创建目录/o...
不知从何时开始,get.docker.com download.docker.com 在腾讯云已经无法访问了,导致之前分享的在线安装方案间接失效,故此记录国内Ubuntu 安装docker的另一种方法
安装篇国外:curl -fsSL https://get.docker.com | bash国内:curl -fsSL https://get.docker.com | bash -s dock...
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-左搜 (leftso.com)Ubuntu 在线安装 Docker-左搜 (...
eolinker 开源版5 PHP版Docker部署eolinker Docker部署准备工作docker 服务docker-compose组件eolinker开源版5关联文章:Ubuntu 在...
docker 常用命令整理(持续更新)docker运行容器资源相关 查看所有运行docker的资源消耗情况docker stats 查看指定运行容器资源消耗情况docker stats 容器ID...
一. Docker-Compose 简介1. Docker-Compose 简介Docker-Compose项目是Docker官方的开源项目,负责实现对Docker容器集群的快速编排。Docke...
docker入门使用教程/linux(centos)系统docker制作教程
Docker swarm 集群NFS共享目录 NFS 主机安装服务端服务端安装命令如下:sudo apt install nfs-kernel-server -yNFS服务端安装 服务端配置NF...
docker与docker-compose配置文件版本对应关系Compose file version 3 reference  Compose file formatDocker Engine...
Docker stack 使用演示案例一环境准备安装好docker swarm(本文以1manager+3worker为例)spring boot demo演示项目通过NFS实现共享目录访问资源...