当前位置: 首页 > article >正文

Docker-CE的部署、国内镜像加速

一、Docker-CE的部署

1.安装一些必要的系统工具

[root@openEuler-1 yum.repos.d]# dnf -y install dnf-plugins-core
Last metadata expiration check: 0:11:13 ago on Sun 02 Mar 2025 01:51:50 PM CST.
Package dnf-plugins-core-4.3.1-3.oe2203sp4.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!

2.添加软件源信息

[root@openEuler-1 ~]# dnf config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
Adding repo from: https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

3.如果是openEuler环境,需要将docker-ce.repo中的变量$releasever进行修改

4.安装docker-ce

[root@openEuler-1 yum.repos.d]# yum install docker-ce -y
 

5.开启docker服务

[root@openEuler-1 yum.repos.d]# systemctl enable --now docker
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
 

6.安装校验

[root@openEuler-1 yum.repos.d]# docker version
Client: Docker Engine - Community
 Version:           26.1.3
 API version:       1.45
 Go version:        go1.21.10
 Git commit:        b72abbb
 Built:             Thu May 16 08:34:39 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.1.3
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.10
  Git commit:       8e96db1
  Built:            Thu May 16 08:33:34 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.32
  GitCommit:        8b3b7ca2e5ce38e8f31a34f35b2b68ceb8470d89
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

二、配置国内镜像加速

1.使用daocloud加速器

[root@openEuler-1 yum.repos.d]# cd /etc/docker/
[root@openEuler-1 docker]# vim daemon.json
[root@openEuler-1 docker]# cat daemon.json
{
    "registry-mirrors": [
        "https://docker.m.daocloud.io",
        "https://hub-mirror.c.163.com",
        "https://mirror.baidubce.com",
        "https://docker.nju.edu.cn"
    ]
}

2.启动服务

[root@openEuler-1 docker]# systemctl daemon-reload
[root@openEuler-1 docker]# systemctl restart docker
 

3.测试拉取镜像

[root@openEuler-1 docker]# docker pull busybox
Using default tag: latest
latest: Pulling from library/busybox
9c0abc9c5bd3: Pull complete
Digest: sha256:498a000f370d8c37927118ed80afe8adc38d1edcbfc071627d17b25c88efcab0
Status: Downloaded newer image for busybox:latest
docker.io/library/busybox:latest

basybox被称为容器测试的“瑞士军刀”,小而强大


http://www.kler.cn/a/569597.html

相关文章:

  • Redis(八):Redis分布式锁实现
  • 深入了解 K-Means 聚类算法:原理与应用
  • 介绍 torch-mlir 从 pytorch 生态到 mlir 生态
  • Android Binder 用法详解
  • 智能AI替代专家系统(ES)、决策支持系统(DSS)?
  • SpringDoc和Swagger使用
  • 深入理解并解析C++ stl::vector
  • MySQL 中如何查看 SQL 的执行计划?
  • 部署Joplin私有云服务器postgres版-docker compose
  • 1JVM概念
  • C# 上位机---INI 文件
  • 基于javaweb的SSM+Maven鲜花商城管理系统设计和实现(源码+文档+部署讲解)
  • 使用haproxy实现MySQL服务器负载均衡
  • Hive之正则表达式
  • [ISP] AE 自动曝光
  • EdgeNext模型详解及代码复现
  • 【HarmonyOS Next】鸿蒙应用折叠屏设备适配方案
  • 使用消息队列怎样防止消息重复?
  • Python爬虫:一文掌握PyQuery模块
  • 深度解析基于Transformer的LLaMA2模型结构:从分词到推理的完整流程