二丫讲梵 二丫讲梵
首页
  • 最佳实践
  • 迎刃而解
  • Nginx
  • Php
  • Zabbix
  • AWS
  • Prometheus
  • Grafana
  • CentOS
  • Systemd
  • Docker
  • Rancher
  • Ansible
  • Ldap
  • Gitlab
  • GitHub
  • Etcd
  • Consul
  • RabbitMQ
  • Kafka
  • MySql
  • MongoDB
  • OpenVPN
  • KVM
  • VMware
  • Other
  • ELK
  • K8S
  • LLM
  • Nexus
  • Jenkins
  • 随写编年
  • 家人物语
  • 追忆青春
  • 父亲的朋友圈
  • 电影音乐
  • 效率工具
  • 博客相关
  • Shell
  • 前端实践
  • Vue学习笔记
  • Golang学习笔记
  • Golang编程技巧
  • 学习周刊
  • Obsidian插件周刊
关于
友链
  • 本站索引

    • 分类
    • 标签
    • 归档
  • 本站页面

    • 导航
    • 打赏
  • 我的工具

    • 备忘录清单 (opens new window)
    • json2go (opens new window)
    • gopher (opens new window)
    • 微信MD编辑 (opens new window)
    • 国内镜像 (opens new window)
    • 出口IP查询 (opens new window)
    • 代码高亮工具 (opens new window)
  • 外站页面

    • 开往 (opens new window)
    • ldapdoc (opens new window)
    • HowToStartOpenSource (opens new window)
    • vdoing-template (opens new window)
GitHub (opens new window)

二丫讲梵

行者常至,为者常成
首页
  • 最佳实践
  • 迎刃而解
  • Nginx
  • Php
  • Zabbix
  • AWS
  • Prometheus
  • Grafana
  • CentOS
  • Systemd
  • Docker
  • Rancher
  • Ansible
  • Ldap
  • Gitlab
  • GitHub
  • Etcd
  • Consul
  • RabbitMQ
  • Kafka
  • MySql
  • MongoDB
  • OpenVPN
  • KVM
  • VMware
  • Other
  • ELK
  • K8S
  • LLM
  • Nexus
  • Jenkins
  • 随写编年
  • 家人物语
  • 追忆青春
  • 父亲的朋友圈
  • 电影音乐
  • 效率工具
  • 博客相关
  • Shell
  • 前端实践
  • Vue学习笔记
  • Golang学习笔记
  • Golang编程技巧
  • 学习周刊
  • Obsidian插件周刊
关于
友链
  • 本站索引

    • 分类
    • 标签
    • 归档
  • 本站页面

    • 导航
    • 打赏
  • 我的工具

    • 备忘录清单 (opens new window)
    • json2go (opens new window)
    • gopher (opens new window)
    • 微信MD编辑 (opens new window)
    • 国内镜像 (opens new window)
    • 出口IP查询 (opens new window)
    • 代码高亮工具 (opens new window)
  • 外站页面

    • 开往 (opens new window)
    • ldapdoc (opens new window)
    • HowToStartOpenSource (opens new window)
    • vdoing-template (opens new window)
GitHub (opens new window)
  • 最佳实践

  • 迎刃而解

  • Nginx

  • Php

  • Zabbix

  • AWS

  • Prometheus

  • Grafana

  • Loki

  • CentOS

  • Supervisord

  • Systemd

  • Docker

    • 从DockerHub到阿里云镜像仓库:整理汇总我同步过的docker镜像(公开可匿名pull)
    • docker的几种安装方式
    • docker配置加速器的几种方案
    • docker搭建官方版私有仓库(了解)
      • 1,直接通过如下命令启动私有仓库。
      • 2,通过配置,连接私服。
      • 3,验证推拉镜像。
      • 4,查看仓库里的镜像。
      • 5,在其他主机测试。
    • Docker笔记之企业级仓库harbor搭建
    • 认识了解Dockerfile
    • 利用Dockerfile创建一些基础镜像
    • Docker笔记之与镜像相关的命令整理
    • 从docker容器时间问题探究到Namespace问题
    • Docker笔记之制作kafka镜像
    • Docker笔记之制作lnmp镜像
    • Docker笔记之使用apline镜像
    • Docker笔记之修改默认数据存储目录
    • Docker笔记之修改默认网段
    • docker磁盘或者镜像清理相关内容
    • centos镜像添加chrome浏览器以及中文字体
    • 利用buildx构建支持多CPU架构平台的docker镜像
    • docker exec命令中含有通配符执行失败的问题
    • Docker 调试构建失败的 Dockerfile 的方法
    • Docker容器如何优雅地访问宿主机网络
  • Docker-Compose

  • Rancher

  • Ansible

  • OpenLdap

  • GitLab

  • GitHub

  • Etcd

  • Consul

  • RabbitMQ

  • Kafka

  • Mysql

  • MongoDB

  • OpenVPN

  • Kvm

  • VMware

  • 配置文件详解

  • Other

  • 运维观止
  • Docker
二丫讲梵
2018-10-27
目录

docker搭建官方版私有仓库(了解)

文章发布较早,内容可能过时,阅读注意甄别。

# 1,直接通过如下命令启动私有仓库。

docker run -d --name registry -v /opt/registry:/var/lib/registry -p 5000:5000 --restart=always registry
1

# 2,通过配置,连接私服。

vim /etc/docker/daemon.json
{
    "insecure-registries": ["192.168.106.5:5000"]
}

systemctl restart docker
1
2
3
4
5
6

# 3,验证推拉镜像。

[root@localhost ~]$docker tag docker.io/ruibaby/halo 192.168.106.5:5000/halo

[root@localhost ~]$docker push 192.168.106.5:5000/halo
The push refers to a repository [192.168.106.5:5000/halo]
235396e2e49d: Pushed
e3da0e1554b0: Pushed
5b2393b02905: Pushed
3344e993faf9: Pushed
f146389833a6: Pushed
bc291d65c8e7: Pushed
8b47d19735d5: Pushed
e9805f9bdc9e: Pushed
9c147c576d67: Pushed
685f72a7cd4f: Pushed
097524d80f54: Pushed
1191b3f5862a: Pushed
08a01612ffca: Pushed
8bb25f9cdc41: Pushed
f715ed19c28b: Pushed
latest: digest: sha256:b14708cdecd988f1da7a6a6c988d58cc4bbf4359e1772901e103c3e42b77ba35 size: 3467
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

申明

原创文章eryajf,未经授权,严禁转载,侵权必究!此乃文中随机水印,敬请读者谅解。

Copyright 二丫讲梵 (opens new window) 版权所有

# 4,查看仓库里的镜像。

[root@localhost ~]$curl -XGET http://192.168.106.5:5000/v2/_catalog
{"repositories":["halo"]}
1
2

也可以在浏览器当中进行查看:

img

# 5,在其他主机测试。

先配置连接。

vim /etc/docker/daemon.json
{
    "insecure-registries": ["192.168.106.5:5000"]
}

systemctl restart docker
1
2
3
4
5
6

然后测试一下拉镜像。

[root@localhost ~]$docker pull 192.168.106.5:5000/halo
Using default tag: latest
Trying to pull repository 192.168.106.5:5000/halo ...
latest: Pulling from 192.168.106.5:5000/halo
bc9ab73e5b14: Pull complete
193a6306c92a: Pull complete
e5c3f8c317dc: Pull complete
a587a86c9dcb: Pull complete
a4c7ee7ef122: Pull complete
a7c0dad691e9: Pull complete
367a6a68b113: Pull complete
28351dec2f89: Pull complete
bfa52db486a3: Pull complete
486c2b19fa61: Pull complete
4347d45f20ca: Pull complete
5f40f4dee7fa: Pull complete
b4fb2907506a: Pull complete
4ce77557a36f: Pull complete
3f42e1292556: Pull complete
Digest: sha256:b14708cdecd988f1da7a6a6c988d58cc4bbf4359e1772901e103c3e42b77ba35
Status: Downloaded newer image for 192.168.106.5:5000/halo:latest
[root@localhost ~]$docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
192.168.106.5:5000/halo   latest              f1bf61fa7d73        8 days ago          721 MB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
微信 支付宝
#docker
上次更新: 2024/07/04, 22:40:37
docker配置加速器的几种方案
Docker笔记之企业级仓库harbor搭建

← docker配置加速器的几种方案 Docker笔记之企业级仓库harbor搭建→

最近更新
01
学习周刊-总第212期-2025年第21周
05-22
02
从赵心童世锦赛夺冠聊聊我的斯诺克情缘
05-16
03
学习周刊-总第211期-2025年第20周
05-15
更多文章>
Theme by Vdoing | Copyright © 2017-2025 | 点击查看十年之约 | 浙ICP备18057030号
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式