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