帮助

Welcome!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

优麒麟系统离线安装docker

形象
张康斌
一、下载docker安装文件

离线包:

阿里镜像:http://mirrors.aliyun.com/docker-ce/linux/static/stable

官方下载:https://download.docker.com/

根据操作系统及架构下载对应的docker:

二、docker安装

1、先在某一位置新建并进入docker文件夹:

mkdir docker
cd docker

2、将下载的安装文件压缩包放入docker中并解压

tar -zxvf docker-27.1.1.tgz

3、解压完成后将docker目录直接移动至/usr/bin

mv docker/* /usr/bin

4、测试docker位置

/usr/bin/dockerd
三、创建docker配置文件 /etc/docker/daemon.json
1、vim /etc/docker/daemon.json

2、单击 i 切换成编辑模式

3、将下列内容添加至文件内:

{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "registry-mirrors": [
    "https://docker.mirrors.ustc.edu.cn",
"http://hub-mirror.c.163.com"
"https://ustc-edu-cn.mirror.aliyuncs.com/",
"https://ccr.ccs.tencentyun.com/",
"https://docker.m.daocloud.io/"
  ],
  "max-concurrent-downloads": 10,
  "log-driver": "json-file",
  "log-level": "warn",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
    },
  "data-root": "/var/lib/docker"
}

4、按ESC输入 :wq ,回车

四、加载配置并启动
systemctl daemon-reload && systemctl enable --now docker.service && systemctl status docker.service
形象
丢弃