标签:epo root https roo cal mil key bin ica
私有Docker Registry的部署和配置
1 docker pull registry //获取registry镜像文件
2
3 docker images //查看本地的registry镜像文件
4 REPOSITORY TAG IMAGE ID CREATED SIZE
5 registry latest 047218491f8c 4 days ago 33.17 MB
6
7 docker run -d -p 5000:5000 --restart=always --name registry registry:latest //运行一个registry的容器
配置docker中的josn文件信息:
[root@localhost /]# cd /etc/docker
[root@localhost docker]# ls
daemon.json key.json
[root@localhost docker]# cat daemon.json
{
"registry-mirrors": ["https://apg1cbea.mirror.aliyuncs.com"],
"insecure-registries":["192.168.1.5:5000"]
}
[root@localhost docker]#
[root@localhost docker]# service docker restart
Redirecting to /bin/systemctl restart docker.service
[root@localhost docker]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mysql 5.6 0248eeb807c7 2 weeks ago 256MB
registry latest d1fd7d86a825 2 months ago 33.3MB
tomcat 8.5 3dcfe809147d 3 months ago 557MB
[root@localhost docker]# docker pull 192.168.1.5:5000/ipms
[root@localhost docker]# docker tag 192.168.1.5:5000/ipms registry.kcsm.com/ipms
在docker-compose中创建相应的配置文件:
[root@localhost usr]# mkdir kcsm
[root@localhost usr]# cd kcsm/
[root@localhost kcsm]# ls
[root@localhost kcsm]# mkdir docker-compose/ipp
mkdir: 无法创建目录"docker-compose/ipp": 没有那个文件或目录
[root@localhost kcsm]# mkdir docker-compose
[root@localhost kcsm]# cd docker-compose/
[root@localhost docker-compose]# ls
[root@localhost docker-compose]# mkdir ipp
[root@localhost docker-compose]# cd ipp/
[root@localhost ipp]# ls
[root@localhost ipp]# ls
docker-compose.yml
[root@localhost ipp]# docker images
标签:epo root https roo cal mil key bin ica
原文地址:https://www.cnblogs.com/love-feng/p/12340646.html