docker私有仓库搭建
来源:互联网 发布:恐怖漫画 软件 编辑:程序博客网 时间:2024/05/19 16:47
环境:
centos 7.2 X64
jdk1.8
一、首先安装 docker
yum -y install dockersystemctl start dockersystemctl enable docker
二、下载私有仓库有镜像
docker pull registry
关闭防火墙
systemctl stop firewalld.service systemctl disable firewalld.service
三、运行私有仓库
docker run -d -p 5000:5000 --restart always -v /opt/data/registry:/tmp/registry registry
参数说明:
-v /opt/registry:/tmp/registry :默认情况下,会将仓库存放于容器内的/tmp/registry目录下,指定本地目录挂载到容器
–privileged=true :CentOS7中的安全模块selinux把权限禁掉了,参数给容器加特权,不加上传镜像会报权限错误(OSError:[Errno 13] Permission denied: ‘/tmp/registry/repositories/liibrary’)或者(Received unexpected HTTP status: 500 Internal Server Error)错误
四、修改/etc/sysconfig/docker(Ubuntu下配置文件地址为:/etc/init/docker.conf),增加启动选项
OPTIONS='--selinux-enabled --insecure-registry 172.172.177.75:5000'
重启docker
systemctl restart docker
五、测试私有仓库
docker pull hello-worlddocker tag hello-world 172.172.177.75:5000/hello-world
其推送到私有仓库:
docker push 172.172.177.75:5000/hello-world
下载镜像
docker pull 172.172.177.75:5000/hello-world
查看仓库中镜像
http://172.172.177.75:5000/v2/_catalog
阅读全文
0 0
- Docker搭建私有仓库
- Docker私有仓库搭建
- 搭建Docker私有仓库
- 搭建docker私有仓库
- docker 搭建私有仓库
- 搭建docker私有仓库
- Docker私有仓库搭建
- docker搭建私有仓库
- docker私有仓库搭建
- docker搭建私有仓库
- docker私有仓库搭建
- Docker私有仓库搭建
- Docker私有仓库搭建
- Docker私有仓库搭建
- Docker私有仓库搭建
- docker搭建私有仓库
- Docker搭建本地私有仓库
- 搭建私有 Docker 仓库服务器
- BlockingQueue源码解析jdk1.8
- SylixOS启动读取配置文件
- 数据库 之 超键、候选键、主键、主属性、外键
- 指针数组及数组指针
- asp.net中iframe详细用法
- docker私有仓库搭建
- Android常用开源项目(十四)
- Android JSON数据解析详细用法
- STL简介
- unkown the request
- git fetch取特定分支
- RFC,其实也就这么多了,不会再多了,基本协议是固定的。
- 使用session对象获取表单信息
- Android解决bug的思路:追本溯源