github.com/pritambaral/docker@v1.4.2-0.20150120174542-b2fe1b3dd952/docs/sources/docker-hub/repos.md (about) 1 page_title: Repositories and Images on Docker Hub 2 page_description: Repositories and Images on Docker Hub 3 page_keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, webhooks, docs, documentation 4 5 # Repositories and Images on Docker Hub 6 7  8 9 ## Searching for repositories and images 10 11 You can `search` for all the publicly available repositories and images using 12 Docker. 13 14 $ sudo docker search ubuntu 15 16 This will show you a list of the currently available repositories on the 17 Docker Hub which match the provided keyword. 18 19 If a repository is private it won't be listed on the repository search 20 results. To see repository statuses, you can look at your [profile 21 page](https://hub.docker.com) on [Docker Hub](https://hub.docker.com). 22 23 ## Repositories 24 25 Your Docker Hub repositories have a number of useful features. 26 27 ### Stars 28 29 Your repositories can be starred and you can star repositories in 30 return. Stars are a way to show that you like a repository. They are 31 also an easy way of bookmarking your favorites. 32 33 ### Comments 34 35 You can interact with other members of the Docker community and maintainers by 36 leaving comments on repositories. If you find any comments that are not 37 appropriate, you can flag them for review. 38 39 ### Collaborators and their role 40 41 A collaborator is someone you want to give access to a private 42 repository. Once designated, they can `push` and `pull` to your 43 repositories. They will not be allowed to perform any administrative 44 tasks such as deleting the repository or changing its status from 45 private to public. 46 47 > **Note:** 48 > A collaborator cannot add other collaborators. Only the owner of 49 > the repository has administrative access. 50 51 You can also collaborate on Docker Hub with organizations and groups. 52 You can read more about that [here](accounts/). 53 54 ## Official Repositories 55 56 The Docker Hub contains a number of [official 57 repositories](http://registry.hub.docker.com/official). These are 58 certified repositories from vendors and contributors to Docker. They 59 contain Docker images from vendors like Canonical, Oracle, and Red Hat 60 that you can use to build applications and services. 61 62 If you use Official Repositories you know you're using a supported, 63 optimized and up-to-date image to power your applications. 64 65 > **Note:** 66 > If you would like to contribute an official repository for your 67 > organization, product or team you can see more information 68 > [here](https://github.com/docker/stackbrew). 69 70 ## Private Repositories 71 72 Private repositories allow you to have repositories that contain images 73 that you want to keep private, either to your own account or within an 74 organization or group. 75 76 To work with a private repository on [Docker 77 Hub](https://hub.docker.com), you will need to add one via the [Add 78 Repository](https://registry.hub.docker.com/account/repositories/add/) 79 link. You get one private repository for free with your Docker Hub 80 account. If you need more accounts you can upgrade your [Docker 81 Hub](https://registry.hub.docker.com/plans/) plan. 82 83 Once the private repository is created, you can `push` and `pull` images 84 to and from it using Docker. 85 86 > *Note:* You need to be signed in and have access to work with a 87 > private repository. 88 89 Private repositories are just like public ones. However, it isn't 90 possible to browse them or search their content on the public registry. 91 They do not get cached the same way as a public repository either. 92 93 It is possible to give access to a private repository to those whom you 94 designate (i.e., collaborators) from its Settings page. From there, you 95 can also switch repository status (*public* to *private*, or 96 vice-versa). You will need to have an available private repository slot 97 open before you can do such a switch. If you don't have any available, 98 you can always upgrade your [Docker 99 Hub](https://registry.hub.docker.com/plans/) plan. 100 101 ## Webhooks 102 103 You can configure webhooks for your repositories on the Repository 104 Settings page. A webhook is called only after a successful `push` is 105 made. The webhook calls are HTTP POST requests with a JSON payload 106 similar to the example shown below. 107 108 > **Note:** For testing, you can try an HTTP request tool like 109 > [requestb.in](http://requestb.in/). 110 111 *Example webhook JSON payload:* 112 113 ``` 114 { 115 "callback_url": "https://registry.hub.docker.com/u/svendowideit/busybox/hook/2141bc0cdec4hebec411i4c1g40242eg110020/", 116 "push_data": { 117 "images": [], 118 "pushed_at": 1.417566822e+09, 119 "pusher": "svendowideit" 120 }, 121 "repository": { 122 "comment_count": 0, 123 "date_created": 1.417566665e+09, 124 "description": "", 125 "full_description": "webhook triggered from a 'docker push'", 126 "is_official": false, 127 "is_private": false, 128 "is_trusted": false, 129 "name": "busybox", 130 "namespace": "svendowideit", 131 "owner": "svendowideit", 132 "repo_name": "svendowideit/busybox", 133 "repo_url": "https://registry.hub.docker.com/u/svendowideit/busybox/", 134 "star_count": 0, 135 "status": "Active" 136 } 137 ``` 138 139 Webhooks allow you to notify people, services and other applications of 140 new updates to your images and repositories. To get started adding webhooks, 141 go to the desired repo in the Hub, and click "Webhooks" under the "Settings" 142 box. 143 144 ### Webhook chains 145 146 Webhook chains allow you to chain calls to multiple services. For example, 147 you can use this to trigger a deployment of your container only after 148 it has been successfully tested, then update a separate Changelog once the 149 deployment is complete. 150 After clicking the "Add webhook" button, simply add as many URLs as necessary 151 in your chain. 152 153 The first webhook in a chain will be called after a successful push. Subsequent 154 URLs will be contacted after the callback has been validated. 155 156 #### Validating a callback 157 158 In order to validate a callback in a webhook chain, you need to 159 160 1. Retrieve the `callback_url` value in the request's JSON payload. 161 1. Send a POST request to this URL containing a valid JSON body. 162 163 > **Note**: A chain request will only be considered complete once the last 164 > callback has been validated. 165 166 To help you debug or simply view the results of your webhook(s), 167 view the "History" of the webhook available on its settings page. 168 169 #### Callback JSON data 170 171 The following parameters are recognized in callback data: 172 173 * `state` (required): Accepted values are `success`, `failure` and `error`. 174 If the state isn't `success`, the webhook chain will be interrupted. 175 * `description`: A string containing miscellaneous information that will be 176 available on the Docker Hub. Maximum 255 characters. 177 * `context`: A string containing the context of the operation. Can be retrieved 178 from the Docker Hub. Maximum 100 characters. 179 * `target_url`: The URL where the results of the operation can be found. Can be 180 retrieved on the Docker Hub. 181 182 *Example callback payload:* 183 184 { 185 "state": "success", 186 "description": "387 tests PASSED", 187 "context": "Continuous integration by Acme CI", 188 "target_url": "http://ci.acme.com/results/afd339c1c3d27" 189 }