docker_practice/basic_concept/repository.md

15 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## Docker 倉庫
倉庫是集中存放鏡像文件的場所。有時候會把倉庫和倉庫註冊服務器Registry混為一談並不嚴格區分。實際上倉庫註冊服務器上往往存放著多個倉庫每個倉庫中又包含了多個鏡像每個鏡像有不同的標簽tag
倉庫分為公開倉庫Public和私有倉庫Private兩種形式。
最大的公開倉庫是 [Docker Hub](https://hub.docker.com),存放了數量龐大的鏡像供用戶下載。
國內的公開倉庫包括 [Docker Pool](http://www.dockerpool.com) 等,可以提供大陸用戶更穩定快速的訪問。
當然,用戶也可以在本地網絡內創建一個私有倉庫。
當用戶創建了自己的鏡像之後就可以使用 `push` 命令將它上傳到公有或者私有倉庫,這樣下次在另外一臺機器上使用這個鏡像時候,只需要從倉庫上 `pull` 下來就可以了。
*註Docker 倉庫的概念跟 [Git](http://git-scm.com) 類似,註冊服務器可以理解為 GitHub 這樣的托管服務。