3. 验证私有仓库是否可用
使用浏览器或 curl 命令 访问私有仓库的 http://localhost:5000/v2/ ,如果返回一个 JSON 字符串 {} 说明服务器正常。
使用 curl 执行结果如下
weimingze@mzstudio:~$ curl http://localhost:5000/v2/
{}weimingze@mzstudio:~$
注意
{}在命令提示符前面。
使用浏览器或 curl 命令 访问私有仓库的 http://localhost:5000/v2/_catalog,将返回一个仓库内的镜像的列表。此时没有放入镜像,列表也为空。
运行结果如下:
weimingze@mzstudio:~$ curl http://localhost:5000/v2/_catalog
{"repositories":[]}
以上结果说明私有仓库的服务器正常运行了。