github.com/daaku/docker@v1.5.0/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  ![repositories](/docker-hub/repos.png)
     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  *Example webhook JSON payload:*
   109  
   110  ```
   111  {
   112    "callback_url": "https://registry.hub.docker.com/u/svendowideit/busybox/hook/2141bc0cdec4hebec411i4c1g40242eg110020/",
   113    "push_data": {
   114      "images": [
   115          "27d47432a69bca5f2700e4dff7de0388ed65f9d3fb1ec645e2bc24c223dc1cc3",
   116          "51a9c7c1f8bb2fa19bcd09789a34e63f35abb80044bc10196e304f6634cc582c",
   117          ...
   118      ],
   119      "pushed_at": 1.417566822e+09,
   120      "pusher": "svendowideit"
   121    },
   122    "repository": {
   123      "comment_count": 0,
   124      "date_created": 1.417566665e+09,
   125      "description": "",
   126      "full_description": "webhook triggered from a 'docker push'",
   127      "is_official": false,
   128      "is_private": false,
   129      "is_trusted": false,
   130      "name": "busybox",
   131      "namespace": "svendowideit",
   132      "owner": "svendowideit",
   133      "repo_name": "svendowideit/busybox",
   134      "repo_url": "https://registry.hub.docker.com/u/svendowideit/busybox/",
   135      "star_count": 0,
   136      "status": "Active"
   137  }
   138  ```
   139  
   140  Webhooks allow you to notify people, services and other applications of
   141  new updates to your images and repositories. To get started adding webhooks,
   142  go to the desired repository in the Hub, and click "Webhooks" under the "Settings"
   143  box.
   144  
   145  > **Note:** For testing, you can try an HTTP request tool like
   146  > [requestb.in](http://requestb.in/).
   147  
   148  > **Note**: The Docker Hub servers are currently in the IP range
   149  > `162.242.195.64 - 162.242.195.127`, so you can restrict your webhooks to
   150  > accept webhook requests from that set of IP addresses.
   151  
   152  ### Webhook chains
   153  
   154  Webhook chains allow you to chain calls to multiple services. For example,
   155  you can use this to trigger a deployment of your container only after
   156  it has been successfully tested, then update a separate Changelog once the
   157  deployment is complete.
   158  After clicking the "Add webhook" button, simply add as many URLs as necessary
   159  in your chain.
   160  
   161  The first webhook in a chain will be called after a successful push. Subsequent
   162  URLs will be contacted after the callback has been validated.
   163  
   164  #### Validating a callback
   165  
   166  In order to validate a callback in a webhook chain, you need to
   167  
   168  1. Retrieve the `callback_url` value in the request's JSON payload.
   169  1. Send a POST request to this URL containing a valid JSON body.
   170  
   171  > **Note**: A chain request will only be considered complete once the last
   172  > callback has been validated.
   173  
   174  To help you debug or simply view the results of your webhook(s),
   175  view the "History" of the webhook available on its settings page.
   176  
   177  #### Callback JSON data
   178  
   179  The following parameters are recognized in callback data:
   180  
   181  * `state` (required): Accepted values are `success`, `failure` and `error`.
   182    If the state isn't `success`, the webhook chain will be interrupted.
   183  * `description`: A string containing miscellaneous information that will be
   184    available on the Docker Hub. Maximum 255 characters.
   185  * `context`: A string containing the context of the operation. Can be retrieved
   186    from the Docker Hub. Maximum 100 characters.
   187  * `target_url`: The URL where the results of the operation can be found. Can be
   188    retrieved on the Docker Hub.
   189  
   190  *Example callback payload:*
   191  
   192      {
   193        "state": "success",
   194        "description": "387 tests PASSED",
   195        "context": "Continuous integration by Acme CI",
   196        "target_url": "http://ci.acme.com/results/afd339c1c3d27"
   197      }