Update title style

Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
This commit is contained in:
Kang HuaiShuai
2019-11-05 23:35:43 +08:00
parent 3ba7560b4d
commit 709c77adcb
39 changed files with 297 additions and 316 deletions

View File

@@ -1,8 +1,8 @@
## Nexus3.x 的私有仓库
# Nexus3.x 的私有仓库
使用 Docker 官方的 Registry 创建的仓库面临一些维护问题比如某些镜像删除以后空间默认是不会回收的需要一些命令去回收空间然后重启 Registry 程序在企业中把内部的一些工具包放入 Nexus 中是比较常见的做法最新版本 `Nexus3.x` 全面支持 Docker 的私有镜像所以使用 [`Nexus3.x`](https://www.sonatype.com/download-oss-sonatype/) 一个软件来管理 `Docker` , `Maven` , `Yum` , `PyPI` 等是一个明智的选择。
### 启动 Nexus 容器
## 启动 Nexus 容器
```bash
$ docker run -d --name nexus3 --restart=always \
@@ -15,7 +15,7 @@ $ docker run -d --name nexus3 --restart=always \
第一次启动 Nexus 的默认帐号是 `admin` 密码是 `admin123` 登录以后点击页面上方的齿轮按钮进行设置
### 创建仓库
## 创建仓库
创建一个私有仓库的方法 `Repository->Repositories` 点击右边菜单 `Create repository` 选择 `docker (hosted)`
@@ -26,7 +26,7 @@ $ docker run -d --name nexus3 --restart=always \
其它的仓库创建方法请各位自己摸索还可以创建一个 docker (proxy) 类型的仓库链接到 DockerHub 再创建一个 docker (group) 类型的仓库把刚才的 hosted proxy 添加在一起主机在访问的时候默认下载私有仓库中的镜像如果没有将链接到 DockerHub 中下载并缓存到 Nexus
### 添加访问权限
## 添加访问权限
菜单 `Security->Realms` Docker Bearer Token Realm 移到右边的框中保存
@@ -34,7 +34,7 @@ $ docker run -d --name nexus3 --restart=always \
添加用户菜单 `Security->Users`->`Create local user` `Roles` 选项中选中刚才创建的规则移动到右边的窗口保存
### NGINX 加密代理
## NGINX 加密代理
证书的生成请参见 [`私有仓库高级配置`](registry_auth.md) 里面证书生成一节
@@ -89,7 +89,7 @@ server {
}
```
### Docker 主机访问镜像仓库
## Docker 主机访问镜像仓库
如果不启用 SSL 加密可以通过前面章节的方法添加信任地址到 Docker 的配置文件中然后重启 Docker