1、下载私服镜像
docker pull registry

2、启动容器
docker run -d -p 5000:5000 -v /opt/data/registry:/var/lib/registry --restart=always registry

3、修改仓库地址
/lib/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.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

(新增此行)OPTIONS='--selinux-enabled --insecure-registry ip:5000'

[Install]
WantedBy=multi-user.target

4、重启docker生效
systemctl restart docker.service

问题:
http: server gave HTTP response to HTTPS client
解决:添加如下文件
root@docker1 docker]# more daemon.json
{"insecure-registries":["ip:5000"] }

docker私服的更多相关文章

  1. docker私服registry管理镜像

    前言 首先试想这样一个场景:当在自己的机器上(docker中)构建了mysql镜像,eureka镜像等等微服务镜像,这些镜像有可能需要放到其他的机器上docker环境中去运行,实行分布式架构部署.但如 ...

  2. docker私服搭建nexus3

    docker私服搭建有官方的registry镜像,也有改版后的NexusOss3.x,因为maven的原因搭建了nexus,所以一并将docker私服也搭建到nexus上. nexus的安装过程就单独 ...

  3. 定时清理docker私服镜像

    定时清理docker私服镜像 使用CI构建docker镜像进行发布极大促进了大家的版本发布效率,于是镜像仓库也就急速膨胀.为了缓解磁盘压力,我们需要设置一些清理策略. 对于不同docker镜像的清理策 ...

  4. 【linux】【docker】docker私服安装

    前言 系统环境:Centos7.jdk1.8 docker私服:可以把项目通过dockerfile文件build成docker镜像,供其他环境拉取.部署在本地,私有化. 安装 dockerHUB私服 ...

  5. Docker私服搭建--Harbor

    Docker私服搭建--Harbor Harbor概述 Harbor的安全机制 Harbor的镜像同步 Harbor的镜像同步机制 Harbor的多级部署 一.安装 1.1 docker安装 1.2 ...

  6. 使用nexus搭建一个docker私服

    使用nexus搭建docker私服 一.需求: 二.实现步骤 1.编写`docker-compose`文件,实现`nexus`的部署 2.修改/usr/lib/systemd/system/docke ...

  7. 使用registry搭建docker私服仓库

    使用registry搭建docker私服仓库 一.拉取 registry镜像 二.根据镜像启动一个容器 1.创建一个数据卷 2.启动容器 三.随机访问一个私服的接口,看是否可以返回数据 四.推送一个镜 ...

  8. Docker 私服

    目录 什么是 Docker 私服? Docker 私服搭建 上传镜像至私服 从私服拉取镜像 什么是 Docker 私服? Docker 官方的 Docker Hub 是一个用于管理公共镜像的仓库,我们 ...

  9. Docker私服仓库push 错误

    docker push 提交时错误提示: docker push 192.168.1.110:5000/redis Error response from daemon: invalid regist ...

随机推荐

  1. Git之”make sure you have the correct access…”

    git 命令在windows下无法使用pull.fetch.push等命令,提示 “please make sure you have the correct access and the repos ...

  2. UNIX基础--安装应用程序: Packages 和 Ports

    Packages and Ports 概述 FreeBSD 将许多系统工具捆绑作为基本系统的一部分.另外,FreeBSD 提供了两种补充的技术来安装第三方软件:FreeBSD Ports Collec ...

  3. Openjudge-NOI题库-对齐输出

     题目描述 Description 读入三个整数,按每个整数占8个字符的宽度,右对齐输出它们.  输入输出格式 Input/output 输入格式: 只有一行,包含三个整数,整数之间以一个空格分开. ...

  4. Hibernate 注解说明

      转:http://blog.csdn.net/u012312373/article/details/46566081   1.类级别注解 @Entity     映射实体类 @Table    映 ...

  5. MFC窗口程序显示命令行输出窗口的方法

    来源:http://blog.csdn.net/k_shmily/article/details/52596927 WINDOWS为你提供了一系列的API来完成这个功能,例如:ReadConsole, ...

  6. Comparer<T> IComparer<T> IComparable<T>

    Comparer<T>.Default Property Comparer<T>.Default doesn't use your FooComparer class. It ...

  7. Linux c 内存高速访问

    概述 要想高速利用内存就必须高效利用cpu cache,关于cpu cache这里就不多加讨论了,自己感兴趣可以google 而cpu访问内存的单位是cache line,因此高效利用cache li ...

  8. Python--变量作用域

    变量作用域: 一般在函数体外定义的变量成为全局变量,在函数内部定义的变量称为局部变量. 全局变量所有作用域都可读,局部变量只能在本函数可读 函数在读取变量时,优先读取函数本身自有的局部变量,再去读全局 ...

  9. {java学习}[第一章]软件开发概述(2017.1.11).

  10. android 调用.NET WebServices

    下载Ksoap2.jar, import org.ksoap2.SoapEnvelope;import org.ksoap2.serialization.*;import org.ksoap2.tra ...