# 上傳到私有倉庫

docker的設定檔 /etc/docker/daemon.json加入倉庫

```
{
  "insecure-registries" : [
    "my-registry.my-org.com","my-registry2.my-org.com"
  ],
  "live-restore": true
}
```

Docker服務重啟

```
root@vm:/home/jennifer# service docker restart
```

先輸入帳號密碼，docker login

```
root@vm:/home/jennifer# docker login my-registry.my-org.com
Username: jennifer
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
```

Docker tag要上傳的映像檔

```
root@vm:/home/jennifer# docker tag cutejaneii/api my-registry.my-org.com/jennifer/api
```

推上私有倉庫

```
root@vm:/home/jennifer# docker push my-registry.my-org.com/jennifer/api
The push refers to repository [my-registry.my-org.com/jennifer/api]
01a609339ca7: Pushed
733003ec1fff: Pushed
1e5bd87d3ff2: Pushed
0419dfadb8ef: Pushed
ec0e85df25bc: Pushed
009127bf716e: Pushed
3fa9f7ba95c7: Pushed
72b0f616187d: Pushed
864a2ba1eda0: Pushed
5f877670877e: Pushed
d35c5bda4793: Pushed
a3c1026c6bcc: Pushed
f1d420c2af1a: Pushed
461719022993: Pushed
latest: digest: sha256:1566000300e05be03c5e896a7f2badb3959825506cda9ae5d786e3f21d1f0414 size: 3264
```


---

# Agent Instructions: 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:

```
GET https://cutejaneii.gitbook.io/docker/docker-registry/shang-chuan-dao-si-you-cang-ku.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
