> For the complete documentation index, see [llms.txt](https://docker.shujuwajue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docker.shujuwajue.com/docker-de-shi-yong/docker-si-you-cang-ku.md).

# Docker私有仓库

## 私有仓库搭建与配置&#x20;

（1）拉取私有仓库镜像（此步省略）&#x20;

```
docker pull registry
```

&#x20;（2）启动私有仓库容器

```
 docker run -di --name=registry -p 5000:5000 registry
```

（3）打开浏览器 输入地址<http://192.168.40.111:5000/v2/\\_catalog看到> {"repositories":\[]} 表示私有仓库 搭建成功并且内容为空

（4）修改daemon.json

```
vi /etc/docker/daemon.json
```

添加以下内容，保存退出。

```
{"insecure-registries":["192.168.184.141:5000"]}
```

此步用于让 docker信任私有仓库地址&#x20;

（5）重启docker 服务

```
systemctl restart docker
```

## 镜像上传至私有仓库

（1）标记此镜像为私有仓库的镜像&#x20;

```
docker tag jdk1.8 192.168.40.111:5000/jdk1.8 
```

（2）再次启动私服容器

```
 docker start registry
```

&#x20;（3）上传标记的镜像&#x20;

```
docker push 192.168.40.111:5000/jdk1.8
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docker.shujuwajue.com/docker-de-shi-yong/docker-si-you-cang-ku.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
