VB.net 2010 视频教程 VB.net 2010 视频教程 python基础视频教程
SQL Server 2008 视频教程 c#入门经典教程 Visual Basic从门到精通视频教程
  • 容器技术之Docker私有镜像仓库docker-distribution(2)

  3、查看docker-distribution安装了那些文件

1
2
3
4
5
6
7
8
9
10
11
12
[root@docker_registry ~]# rpm -ql docker-distribution
/etc/docker-distribution/registry/config.yml
/usr/bin/registry
/usr/lib/systemd/system/docker-distribution.service
/usr/share/doc/docker-distribution-2.6.2
/usr/share/doc/docker-distribution-2.6.2/AUTHORS
/usr/share/doc/docker-distribution-2.6.2/CONTRIBUTING.md
/usr/share/doc/docker-distribution-2.6.2/LICENSE
/usr/share/doc/docker-distribution-2.6.2/MAINTAINERS
/usr/share/doc/docker-distribution-2.6.2/README.md
/var/lib/registry
[root@docker_registry ~]#

  提示:/etc/docker-distribution/registry/config.yml这个文件用于配置registry的配置文件;/usr/bin/registry是二进制应用程序;/usr/lib/systemd/system/docker-distribution.service 这个文件是docker-distribution的unit file;/var/lib/registry这个目录用于存放我们上传到registry上的镜像存放地;

  4、查看配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@docker_registry ~]# cat /etc/docker-distribution/registry/config.yml
version: 0.1
log:
  fields:
    service: registry
storage:
    cache:
        layerinfo: inmemory
    filesystem:
        rootdirectory: /var/lib/registry
http:
    addr: :5000
[root@docker_registry ~]#

  提示:这个配置文件是一个yml语法的配置文件,从上面的信息可以看到,默认情况docker-distribution监听在tcp的5000端口;存放镜像的目录是/var/lib/registry/目录下;

  5、启动docker-distribution

1
2
3
4
5
6
7
8
9
[root@docker_registry ~]# systemctl start docker-distribution
[root@docker_registry ~]# ss -tnl
State       Recv-Q Send-Q            Local Address:Port                           Peer Address:Port             
LISTEN      0      128                           *:22                                        *:*                 
LISTEN      0      100                   127.0.0.1:25                                        *:*                 
LISTEN      0      128                          :::22                                       :::*                 
LISTEN      0      100                         ::1:25                                       :::*                 
LISTEN      0      128                          :::5000                                     :::*                 
[root@docker_registry ~]#

相关教程