Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,86 +0,0 @@ |
| 1 |
-<!--[metadata]> |
|
| 2 |
-+++ |
|
| 3 |
-title = "Accounts on Docker Hub" |
|
| 4 |
-description = "Docker Hub accounts" |
|
| 5 |
-keywords = ["Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation"] |
|
| 6 |
-[menu.main] |
|
| 7 |
-parent = "smn_pubhub" |
|
| 8 |
-weight = 1 |
|
| 9 |
-+++ |
|
| 10 |
-<![end-metadata]--> |
|
| 11 |
- |
|
| 12 |
-# Accounts on Docker Hub |
|
| 13 |
- |
|
| 14 |
-## Docker Hub accounts |
|
| 15 |
- |
|
| 16 |
-You can `search` for Docker images and `pull` them from [Docker |
|
| 17 |
-Hub](https://hub.docker.com) without signing in or even having an |
|
| 18 |
-account. However, in order to `push` images, leave comments or to *star* |
|
| 19 |
-a repository, you are going to need a [Docker |
|
| 20 |
-Hub](https://hub.docker.com) account. |
|
| 21 |
- |
|
| 22 |
-### Registration for a Docker Hub account |
|
| 23 |
- |
|
| 24 |
-You can get a [Docker Hub](https://hub.docker.com) account by |
|
| 25 |
-[signing up for one here](https://hub.docker.com/account/signup/). A valid |
|
| 26 |
-email address is required to register, which you will need to verify for |
|
| 27 |
-account activation. |
|
| 28 |
- |
|
| 29 |
-### Email activation process |
|
| 30 |
- |
|
| 31 |
-You need to have at least one verified email address to be able to use your |
|
| 32 |
-[Docker Hub](https://hub.docker.com) account. If you can't find the validation email, |
|
| 33 |
-you can request another by visiting the [Resend Email Confirmation]( |
|
| 34 |
-https://hub.docker.com/account/resend-email-confirmation/) page. |
|
| 35 |
- |
|
| 36 |
-### Password reset process |
|
| 37 |
- |
|
| 38 |
-If you can't access your account for some reason, you can reset your password |
|
| 39 |
-from the [*Password Reset*](https://hub.docker.com/account/forgot-password/) |
|
| 40 |
-page. |
|
| 41 |
- |
|
| 42 |
-## Organizations and groups |
|
| 43 |
- |
|
| 44 |
-A Docker Hub organization contains public and private repositories just like |
|
| 45 |
-a user account. Access to push, pull or create these organisation owned repositories |
|
| 46 |
-is allocated by defining groups of users and then assigning group rights to |
|
| 47 |
-specific repositories. This allows you to distribute limited access |
|
| 48 |
-Docker images, and to select which Docker Hub users can publish new images. |
|
| 49 |
- |
|
| 50 |
-### Creating and viewing organizations |
|
| 51 |
- |
|
| 52 |
-You can see what organizations [you belong to and add new organizations]( |
|
| 53 |
-https://hub.docker.com/account/organizations/) from the Account Settings |
|
| 54 |
-tab. They are also listed below your user name on your repositories page |
|
| 55 |
-and in your account profile. |
|
| 56 |
- |
|
| 57 |
- |
|
| 58 |
- |
|
| 59 |
-### Organization groups |
|
| 60 |
- |
|
| 61 |
-Users in the `Owners` group of an organization can create and modify the |
|
| 62 |
-membership of groups. |
|
| 63 |
- |
|
| 64 |
-Unless they are the organization's `Owner`, users can only see groups of which they |
|
| 65 |
-are members. |
|
| 66 |
- |
|
| 67 |
- |
|
| 68 |
- |
|
| 69 |
-### Repository group permissions |
|
| 70 |
- |
|
| 71 |
-Use organization groups to manage the users that can interact with your repositories. |
|
| 72 |
- |
|
| 73 |
-You must be in an organization's `Owners` group to create a new group, Hub |
|
| 74 |
-repository, or automated build. As an `Owner`, you then delegate the following |
|
| 75 |
-repository access rights to groups: |
|
| 76 |
- |
|
| 77 |
-| Access Right | Description | |
|
| 78 |
-|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
|
| 79 |
-| `Read` | Users with this right can view, search, and pull a private repository. | |
|
| 80 |
-| `Write` | Users with this right can push to non-automated repositories on the Docker Hub. | |
|
| 81 |
-| `Admin` | Users with this right can modify a repository's "Description", "Collaborators" rights. They can also mark a repository as unlisted, change its "Public/Private" status and "Delete" the repository. Finally, `Admin` rights are required to read the build log on a repo. | |
|
| 82 |
-| | | |
|
| 83 |
- |
|
| 84 |
-Regardless of their actual access rights, users with unverified email addresses |
|
| 85 |
-have `Read` access to the repository. Once they have verified their address, |
|
| 86 |
-they have their full access rights as granted on the organization. |
| 87 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,465 +0,0 @@ |
| 1 |
-<!--[metadata]> |
|
| 2 |
-+++ |
|
| 3 |
-title = "Automated Builds on Docker Hub" |
|
| 4 |
-description = "Docker Hub Automated Builds" |
|
| 5 |
-keywords = ["Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation, trusted, builds, trusted builds, automated builds"] |
|
| 6 |
-[menu.main] |
|
| 7 |
-parent = "smn_pubhub" |
|
| 8 |
-weight = 3 |
|
| 9 |
-+++ |
|
| 10 |
-<![end-metadata]--> |
|
| 11 |
- |
|
| 12 |
-# Automated Builds on Docker Hub |
|
| 13 |
- |
|
| 14 |
-## About Automated Builds |
|
| 15 |
- |
|
| 16 |
-*Automated Builds* are a special feature of Docker Hub which allow you to |
|
| 17 |
-use [Docker Hub's](https://hub.docker.com) build clusters to automatically |
|
| 18 |
-create images from a GitHub or Bitbucket repository containing a `Dockerfile` |
|
| 19 |
-The system will clone your repository and build the image described by the |
|
| 20 |
-`Dockerfile` using the directory the `Dockerfile` is in (and subdirectories) |
|
| 21 |
-as the build context. The resulting automated image will then be uploaded |
|
| 22 |
-to the Docker Hub registry and marked as an *Automated Build*. |
|
| 23 |
- |
|
| 24 |
-Automated Builds have several advantages: |
|
| 25 |
- |
|
| 26 |
-* Users of *your* Automated Build can trust that the resulting |
|
| 27 |
-image was built exactly as specified. |
|
| 28 |
-* The `Dockerfile` will be available to anyone with access to |
|
| 29 |
-your repository on the Docker Hub registry. |
|
| 30 |
-* Because the process is automated, Automated Builds help to |
|
| 31 |
-make sure that your repository is always up to date. |
|
| 32 |
-* Not having to push local Docker images to Docker Hub saves |
|
| 33 |
-you both network bandwidth and time. |
|
| 34 |
- |
|
| 35 |
-Automated Builds are supported for both public and private repositories |
|
| 36 |
-on both [GitHub](http://github.com) and [Bitbucket](https://bitbucket.org/). |
|
| 37 |
- |
|
| 38 |
-To use Automated Builds, you must have an [account on Docker Hub]( |
|
| 39 |
-https://docs.docker.com/userguide/dockerhub/#creating-a-docker-hub-account) |
|
| 40 |
-and on GitHub and/or Bitbucket. In either case, the account needs |
|
| 41 |
-to be properly validated and activated before you can link to it. |
|
| 42 |
- |
|
| 43 |
-The first time you to set up an Automated Build, your |
|
| 44 |
-[Docker Hub](https://hub.docker.com) account will need to be linked to |
|
| 45 |
-a GitHub or Bitbucket account. |
|
| 46 |
-This will allow the registry to see your repositories. |
|
| 47 |
- |
|
| 48 |
-If you have previously linked your Docker Hub account, and want to view or modify |
|
| 49 |
-that link, click on the "Manage - Settings" link in the sidebar, and then |
|
| 50 |
-"Linked Accounts" in your Settings sidebar. |
|
| 51 |
- |
|
| 52 |
-## Automated Builds from GitHub |
|
| 53 |
- |
|
| 54 |
-If you've previously linked your Docker Hub account to your GitHub account, |
|
| 55 |
-you'll be able to skip to the [Creating an Automated Build](#creating-an-automated-build). |
|
| 56 |
- |
|
| 57 |
-### Linking your Docker Hub account to a GitHub account |
|
| 58 |
- |
|
| 59 |
-> *Note:* |
|
| 60 |
-> Automated Builds currently require *read* and *write* access since |
|
| 61 |
-> [Docker Hub](https://hub.docker.com) needs to setup a GitHub service |
|
| 62 |
-> hook. We have no choice here, this is how GitHub manages permissions, sorry! |
|
| 63 |
-> We do guarantee nothing else will be touched in your account. |
|
| 64 |
- |
|
| 65 |
-To get started, log into your Docker Hub account and click the |
|
| 66 |
-"+ Add Repository" button at the upper right of the screen. Then select |
|
| 67 |
-[Automated Build](https://registry.hub.docker.com/builds/add/). |
|
| 68 |
- |
|
| 69 |
-Select the [GitHub service](https://registry.hub.docker.com/associate/github/). |
|
| 70 |
- |
|
| 71 |
-When linking to GitHub, you'll need to select either "Public and Private", |
|
| 72 |
-or "Limited" linking. |
|
| 73 |
- |
|
| 74 |
-The "Public and Private" option is the easiest to use, |
|
| 75 |
-as it grants the Docker Hub full access to all of your repositories. GitHub |
|
| 76 |
-also allows you to grant access to repositories belonging to your GitHub |
|
| 77 |
-organizations. |
|
| 78 |
- |
|
| 79 |
-By choosing the "Limited" linking, your Docker Hub account only gets permission |
|
| 80 |
-to access your public data and public repositories. |
|
| 81 |
- |
|
| 82 |
-Follow the onscreen instructions to authorize and link your |
|
| 83 |
-GitHub account to Docker Hub. Once it is linked, you'll be able to |
|
| 84 |
-choose a source repository from which to create the Automatic Build. |
|
| 85 |
- |
|
| 86 |
-You will be able to review and revoke Docker Hub's access by visiting the |
|
| 87 |
-[GitHub User's Applications settings](https://github.com/settings/applications). |
|
| 88 |
- |
|
| 89 |
-> **Note**: If you delete the GitHub account linkage that is used for one of your |
|
| 90 |
-> automated build repositories, the previously built images will still be available. |
|
| 91 |
-> If you re-link to that GitHub account later, the automated build can be started |
|
| 92 |
-> using the "Start Build" button on the Hub, or if the webhook on the GitHub repository |
|
| 93 |
-> still exists, will be triggered by any subsequent commits. |
|
| 94 |
- |
|
| 95 |
-### Auto builds and limited linked GitHub accounts. |
|
| 96 |
- |
|
| 97 |
-If you selected to link your GitHub account with only a "Limited" link, then |
|
| 98 |
-after creating your automated build, you will need to either manually trigger a |
|
| 99 |
-Docker Hub build using the "Start a Build" button, or add the GitHub webhook |
|
| 100 |
-manually, as described in [GitHub Service Hooks](#github-service-hooks). |
|
| 101 |
- |
|
| 102 |
-### Changing the GitHub user link |
|
| 103 |
- |
|
| 104 |
-If you want to remove, or change the level of linking between your GitHub account |
|
| 105 |
-and the Docker Hub, you need to do this in two places. |
|
| 106 |
- |
|
| 107 |
-First, remove the "Linked Account" from your Docker Hub "Settings". |
|
| 108 |
-Then go to your GitHub account's Personal settings, and in the "Applications" |
|
| 109 |
-section, "Revoke access". |
|
| 110 |
- |
|
| 111 |
-You can now re-link your account at any time. |
|
| 112 |
- |
|
| 113 |
-### GitHub organizations |
|
| 114 |
- |
|
| 115 |
-GitHub organizations and private repositories forked from organizations will be |
|
| 116 |
-made available to auto build using the "Docker Hub Registry" application, which |
|
| 117 |
-needs to be added to the organization - and then will apply to all users. |
|
| 118 |
- |
|
| 119 |
-To check, or request access, go to your GitHub user's "Setting" page, select the |
|
| 120 |
-"Applications" section from the left side bar, then click the "View" button for |
|
| 121 |
-"Docker Hub Registry". |
|
| 122 |
- |
|
| 123 |
- |
|
| 124 |
- |
|
| 125 |
-The organization's administrators may need to go to the Organization's "Third |
|
| 126 |
-party access" screen in "Settings" to Grant or Deny access to the Docker Hub |
|
| 127 |
-Registry application. This change will apply to all organization members. |
|
| 128 |
- |
|
| 129 |
- |
|
| 130 |
- |
|
| 131 |
-More detailed access controls to specific users and GitHub repositories would be |
|
| 132 |
-managed using the GitHub People and Teams interfaces. |
|
| 133 |
- |
|
| 134 |
-### Creating an Automated Build |
|
| 135 |
- |
|
| 136 |
-You can [create an Automated Build]( |
|
| 137 |
-https://registry.hub.docker.com/builds/github/select/) from any of your |
|
| 138 |
-public or private GitHub repositories that have a `Dockerfile`. |
|
| 139 |
- |
|
| 140 |
-Once you've selected the source repository, you can then configure: |
|
| 141 |
- |
|
| 142 |
-- The Hub user/org the repository is built to - either your Hub account name, |
|
| 143 |
-or the name of any Hub organizations your account is in |
|
| 144 |
-- The Docker repository name the image is built to |
|
| 145 |
-- If the Docker repository should be "Public" or "Private" |
|
| 146 |
- You can change the accessibility options after the repository has been created. |
|
| 147 |
- If you add a Private repository to a Hub user, then you can only add other users |
|
| 148 |
- as collaborators, and those users will be able to view and pull all images in that |
|
| 149 |
- repository. To configure more granular access permissions, such as using groups of |
|
| 150 |
- users or allow different users access to different image tags, then you need |
|
| 151 |
- to add the Private repository to a Hub organization that your user has Administrator |
|
| 152 |
- privilege on. |
|
| 153 |
-- If you want the GitHub to notify the Docker Hub when a commit is made, and thus trigger |
|
| 154 |
- a rebuild of all the images in this automated build. |
|
| 155 |
- |
|
| 156 |
-You can also select one or more |
|
| 157 |
-- The git branch/tag, which repository sub-directory to use as the context |
|
| 158 |
-- The Docker image tag name |
|
| 159 |
- |
|
| 160 |
-You can set a description for the repository by clicking "Description" link in the righthand side bar after the automated build - note that the "Full Description" will be over-written next build from the README.md file. |
|
| 161 |
-has been created. |
|
| 162 |
- |
|
| 163 |
-### GitHub private submodules |
|
| 164 |
- |
|
| 165 |
-If your GitHub repository contains links to private submodules, you'll get an |
|
| 166 |
-error message in your build. |
|
| 167 |
- |
|
| 168 |
-Normally, the Docker Hub sets up a deploy key in your GitHub repository. |
|
| 169 |
-Unfortunately, GitHub only allows a repository deploy key to access a single repository. |
|
| 170 |
- |
|
| 171 |
-To work around this, you need to create a dedicated user account in GitHub and attach |
|
| 172 |
-the automated build's deploy key that account. This dedicated build account |
|
| 173 |
-can be limited to read-only access to just the repositories required to build. |
|
| 174 |
- |
|
| 175 |
-<table class="table table-bordered"> |
|
| 176 |
- <thead> |
|
| 177 |
- <tr> |
|
| 178 |
- <th>Step</th> |
|
| 179 |
- <th>Screenshot</th> |
|
| 180 |
- <th>Description</th> |
|
| 181 |
- </tr> |
|
| 182 |
- </thead> |
|
| 183 |
- <tbody> |
|
| 184 |
- <tr> |
|
| 185 |
- <td>1.</td> |
|
| 186 |
- <td><img src="/docker-hub/hub-images/gh_org_members.png"></td> |
|
| 187 |
- <td>First, create the new account in GitHub. It should be given read-only |
|
| 188 |
- access to the main repository and all submodules that are needed.</td> |
|
| 189 |
- </tr> |
|
| 190 |
- <tr> |
|
| 191 |
- <td>2.</td> |
|
| 192 |
- <td><img src="/docker-hub/hub-images/gh_team_members.png"></td> |
|
| 193 |
- <td>This can be accomplished by adding the account to a read-only team in |
|
| 194 |
- the organization(s) where the main GitHub repository and all submodule |
|
| 195 |
- repositories are kept.</td> |
|
| 196 |
- </tr> |
|
| 197 |
- <tr> |
|
| 198 |
- <td>3.</td> |
|
| 199 |
- <td><img src="/docker-hub/hub-images/gh_repo_deploy_key.png"></td> |
|
| 200 |
- <td>Next, remove the deploy key from the main GitHub repository. This can be done in the GitHub repository's "Deploy keys" Settings section.</td> |
|
| 201 |
- </tr> |
|
| 202 |
- <tr> |
|
| 203 |
- <td>4.</td> |
|
| 204 |
- <td><img src="/docker-hub/hub-images/deploy_key.png"></td> |
|
| 205 |
- <td>Your automated build's deploy key is in the "Build Details" menu |
|
| 206 |
- under "Deploy keys".</td> |
|
| 207 |
- </tr> |
|
| 208 |
- <tr> |
|
| 209 |
- <td>5.</td> |
|
| 210 |
- <td><img src="/docker-hub/hub-images/gh_add_ssh_user_key.png"></td> |
|
| 211 |
- <td>In your dedicated GitHub User account, add the deploy key from your |
|
| 212 |
- Docker Hub Automated Build.</td> |
|
| 213 |
- </tr> |
|
| 214 |
- </tbody> |
|
| 215 |
-</table> |
|
| 216 |
- |
|
| 217 |
-### GitHub service hooks |
|
| 218 |
- |
|
| 219 |
-The GitHub Service hook allows GitHub to notify the Docker Hub when something has |
|
| 220 |
-been committed to that git repository. You will need to add the Service Hook manually |
|
| 221 |
-if your GitHub account is "Limited" linked to the Docker Hub. |
|
| 222 |
- |
|
| 223 |
-Follow the steps below to configure the GitHub Service hooks for your Automated Build: |
|
| 224 |
- |
|
| 225 |
-<table class="table table-bordered"> |
|
| 226 |
- <thead> |
|
| 227 |
- <tr> |
|
| 228 |
- <th>Step</th> |
|
| 229 |
- <th>Screenshot</th> |
|
| 230 |
- <th>Description</th> |
|
| 231 |
- </tr> |
|
| 232 |
- </thead> |
|
| 233 |
- <tbody> |
|
| 234 |
- <tr> |
|
| 235 |
- <td>1.</td> |
|
| 236 |
- <td><img src="/docker-hub/hub-images/gh_settings.png"></td> |
|
| 237 |
- <td>Log in to GitHub.com, and go to your Repository page. Click on "Settings" on |
|
| 238 |
- the right side of the page. You must have admin privileges to the repository in order to do this.</td> |
|
| 239 |
- </tr> |
|
| 240 |
- <tr> |
|
| 241 |
- <td>2.</td> |
|
| 242 |
- <td><img src="/docker-hub/hub-images/gh_menu.png" alt="Webhooks & Services"></td> |
|
| 243 |
- <td>Click on "Webhooks & Services" on the left side of the page.</td></tr> |
|
| 244 |
- <tr><td>3.</td> |
|
| 245 |
- <td><img src="/docker-hub/hub-images/gh_service_hook.png" alt="Find the service labeled Docker"></td> |
|
| 246 |
- <td>Find the service labeled "Docker" (or click on "Add service") and click on it.</td></tr> |
|
| 247 |
- <tr><td>4.</td> |
|
| 248 |
- <td><img src="/docker-hub/hub-images/gh_docker-service.png" alt="Activate Service Hooks"></td> |
|
| 249 |
- <td>Make sure the "Active" checkbox is selected and click the "Update service" button to save your changes.</td> |
|
| 250 |
- </tr> |
|
| 251 |
- </tbody> |
|
| 252 |
-</table> |
|
| 253 |
- |
|
| 254 |
-## Automated Builds with Bitbucket |
|
| 255 |
- |
|
| 256 |
-In order to setup an Automated Build, you need to first link your |
|
| 257 |
-[Docker Hub](https://hub.docker.com) account with a Bitbucket account. |
|
| 258 |
-This will allow the registry to see your repositories. |
|
| 259 |
- |
|
| 260 |
-To get started, log into your Docker Hub account and click the |
|
| 261 |
-"+ Add Repository" button at the upper right of the screen. Then |
|
| 262 |
-select [Automated Build](https://registry.hub.docker.com/builds/add/). |
|
| 263 |
- |
|
| 264 |
-Select the [Bitbucket source]( |
|
| 265 |
-https://registry.hub.docker.com/associate/bitbucket/). |
|
| 266 |
- |
|
| 267 |
-Then follow the onscreen instructions to authorize and link your |
|
| 268 |
-Bitbucket account to Docker Hub. Once it is linked, you'll be able |
|
| 269 |
-to choose a repository from which to create the Automatic Build. |
|
| 270 |
- |
|
| 271 |
-### Creating an Automated Build |
|
| 272 |
- |
|
| 273 |
-You can [create an Automated Build]( |
|
| 274 |
-https://registry.hub.docker.com/builds/bitbucket/select/) from any of your |
|
| 275 |
-public or private Bitbucket repositories with a `Dockerfile`. |
|
| 276 |
- |
|
| 277 |
-### Adding a Hook |
|
| 278 |
- |
|
| 279 |
-When you link your Docker Hub account, a `POST` hook should get automatically |
|
| 280 |
-added to your Bitbucket repository. Follow the steps below to confirm or modify the |
|
| 281 |
-Bitbucket hooks for your Automated Build: |
|
| 282 |
- |
|
| 283 |
-<table class="table table-bordered"> |
|
| 284 |
- <thead> |
|
| 285 |
- <tr> |
|
| 286 |
- <th>Step</th> |
|
| 287 |
- <th>Screenshot</th> |
|
| 288 |
- <th>Description</th> |
|
| 289 |
- </tr> |
|
| 290 |
- </thead> |
|
| 291 |
- <tbody> |
|
| 292 |
- <tr> |
|
| 293 |
- <td>1.</td> |
|
| 294 |
- <td><img src="/docker-hub/hub-images/bb_menu.png" alt="Settings" width="180"></td> |
|
| 295 |
- <td>Log in to Bitbucket.org and go to your Repository page. Click on "Settings" on |
|
| 296 |
- the far left side of the page, under "Navigation". You must have admin privileges |
|
| 297 |
- to the repository in order to do this.</td> |
|
| 298 |
- </tr> |
|
| 299 |
- <tr> |
|
| 300 |
- <td>2.</td> |
|
| 301 |
- <td><img src="/docker-hub/hub-images/bb_hooks.png" alt="Hooks" width="180"></td> |
|
| 302 |
- <td>Click on "Hooks" on the near left side of the page, under "Settings".</td></tr> |
|
| 303 |
- <tr> |
|
| 304 |
- <td>3.</td> |
|
| 305 |
- <td><img src="/docker-hub/hub-images/bb_post-hook.png" alt="Docker Post Hook"></td><td>You should now see a list of hooks associated with the repo, including a <code>POST</code> hook that points at |
|
| 306 |
- registry.hub.docker.com/hooks/bitbucket.</td> |
|
| 307 |
- </tr> |
|
| 308 |
- </tbody> |
|
| 309 |
-</table> |
|
| 310 |
- |
|
| 311 |
- |
|
| 312 |
-## The Dockerfile and Automated Builds |
|
| 313 |
- |
|
| 314 |
-During the build process, Docker will copy the contents of your `Dockerfile`. |
|
| 315 |
-It will also add it to the [Docker Hub](https://hub.docker.com) for the Docker |
|
| 316 |
-community (for public repositories) or approved team members/orgs (for private |
|
| 317 |
-repositories) to see on the repository page. |
|
| 318 |
- |
|
| 319 |
-### README.md |
|
| 320 |
- |
|
| 321 |
-If you have a `README.md` file in your repository, it will be used as the |
|
| 322 |
-repository's full description.The build process will look for a |
|
| 323 |
-`README.md` in the same directory as your `Dockerfile`. |
|
| 324 |
- |
|
| 325 |
-> **Warning:** |
|
| 326 |
-> If you change the full description after a build, it will be |
|
| 327 |
-> rewritten the next time the Automated Build has been built. To make changes, |
|
| 328 |
-> modify the `README.md` from the Git repository. |
|
| 329 |
- |
|
| 330 |
-## Remote Build triggers |
|
| 331 |
- |
|
| 332 |
-If you need a way to trigger Automated Builds outside of GitHub or Bitbucket, |
|
| 333 |
-you can set up a build trigger. When you turn on the build trigger for an |
|
| 334 |
-Automated Build, it will give you a URL to which you can send POST requests. |
|
| 335 |
-This will trigger the Automated Build, much as with a GitHub webhook. |
|
| 336 |
- |
|
| 337 |
-Build triggers are available under the Settings menu of each Automated Build |
|
| 338 |
-repository on the Docker Hub. |
|
| 339 |
- |
|
| 340 |
- |
|
| 341 |
- |
|
| 342 |
-You can use `curl` to trigger a build: |
|
| 343 |
- |
|
| 344 |
-``` |
|
| 345 |
-$ curl --data "build=true" -X POST https://registry.hub.docker.com/u/svendowideit/testhook/trigger/be579c |
|
| 346 |
-82-7c0e-11e4-81c4-0242ac110020/ |
|
| 347 |
-OK |
|
| 348 |
-``` |
|
| 349 |
- |
|
| 350 |
-> **Note:** |
|
| 351 |
-> You can only trigger one build at a time and no more than one |
|
| 352 |
-> every five minutes. If you already have a build pending, or if you |
|
| 353 |
-> recently submitted a build request, those requests *will be ignored*. |
|
| 354 |
-> To verify everything is working correctly, check the logs of last |
|
| 355 |
-> ten triggers on the settings page . |
|
| 356 |
- |
|
| 357 |
-## Webhooks |
|
| 358 |
- |
|
| 359 |
-Automated Builds also include a Webhooks feature. Webhooks can be called |
|
| 360 |
-after a successful repository push is made. This includes when a new tag is added |
|
| 361 |
-to an existing image. |
|
| 362 |
- |
|
| 363 |
-The webhook call will generate a HTTP POST with the following JSON |
|
| 364 |
-payload: |
|
| 365 |
- |
|
| 366 |
-``` |
|
| 367 |
-{
|
|
| 368 |
- "callback_url": "https://registry.hub.docker.com/u/svendowideit/testhook/hook/2141b5bi5i5b02bec211i4eeih0242eg11000a/", |
|
| 369 |
- "push_data": {
|
|
| 370 |
- "images": [ |
|
| 371 |
- "27d47432a69bca5f2700e4dff7de0388ed65f9d3fb1ec645e2bc24c223dc1cc3", |
|
| 372 |
- "51a9c7c1f8bb2fa19bcd09789a34e63f35abb80044bc10196e304f6634cc582c", |
|
| 373 |
- ... |
|
| 374 |
- ], |
|
| 375 |
- "pushed_at": 1.417566161e+09, |
|
| 376 |
- "pusher": "trustedbuilder" |
|
| 377 |
- }, |
|
| 378 |
- "repository": {
|
|
| 379 |
- "comment_count": 0, |
|
| 380 |
- "date_created": 1.417494799e+09, |
|
| 381 |
- "description": "", |
|
| 382 |
- "dockerfile": "#\n# BUILD\u0009\u0009docker build -t svendowideit/apt-cacher .\n# RUN\u0009\u0009docker run -d -p 3142:3142 -name apt-cacher-run apt-cacher\n#\n# and then you can run containers with:\n# \u0009\u0009docker run -t -i -rm -e http_proxy http://192.168.1.2:3142/ debian bash\n#\nFROM\u0009\u0009ubuntu\nMAINTAINER\u0009SvenDowideit@home.org.au\n\n\nVOLUME\u0009\u0009[\"/var/cache/apt-cacher-ng\"]\nRUN\u0009\u0009apt-get update ; apt-get install -yq apt-cacher-ng\n\nEXPOSE \u0009\u00093142\nCMD\u0009\u0009chmod 777 /var/cache/apt-cacher-ng ; /etc/init.d/apt-cacher-ng start ; tail -f /var/log/apt-cacher-ng/*\n", |
|
| 383 |
- "full_description": "Docker Hub based automated build from a GitHub repo", |
|
| 384 |
- "is_official": false, |
|
| 385 |
- "is_private": true, |
|
| 386 |
- "is_trusted": true, |
|
| 387 |
- "name": "testhook", |
|
| 388 |
- "namespace": "svendowideit", |
|
| 389 |
- "owner": "svendowideit", |
|
| 390 |
- "repo_name": "svendowideit/testhook", |
|
| 391 |
- "repo_url": "https://registry.hub.docker.com/u/svendowideit/testhook/", |
|
| 392 |
- "star_count": 0, |
|
| 393 |
- "status": "Active" |
|
| 394 |
- } |
|
| 395 |
-} |
|
| 396 |
-``` |
|
| 397 |
- |
|
| 398 |
-Webhooks are available under the Settings menu of each Repository. |
|
| 399 |
-Use a tool like [requestb.in](http://requestb.in/) to test your webhook. |
|
| 400 |
- |
|
| 401 |
-> **Note**: The Docker Hub servers use an elastic IP range, so you can't |
|
| 402 |
-> filter requests by IP. |
|
| 403 |
- |
|
| 404 |
-### Webhook chains |
|
| 405 |
- |
|
| 406 |
-Webhook chains allow you to chain calls to multiple services. For example, |
|
| 407 |
-you can use this to trigger a deployment of your container only after |
|
| 408 |
-it has been successfully tested, then update a separate Changelog once the |
|
| 409 |
-deployment is complete. |
|
| 410 |
-After clicking the "Add webhook" button, simply add as many URLs as necessary |
|
| 411 |
-in your chain. |
|
| 412 |
- |
|
| 413 |
-The first webhook in a chain will be called after a successful push. Subsequent |
|
| 414 |
-URLs will be contacted after the callback has been validated. |
|
| 415 |
- |
|
| 416 |
-### Validating a callback |
|
| 417 |
- |
|
| 418 |
-In order to validate a callback in a webhook chain, you need to |
|
| 419 |
- |
|
| 420 |
-1. Retrieve the `callback_url` value in the request's JSON payload. |
|
| 421 |
-1. Send a POST request to this URL containing a valid JSON body. |
|
| 422 |
- |
|
| 423 |
-> **Note**: A chain request will only be considered complete once the last |
|
| 424 |
-> callback has been validated. |
|
| 425 |
- |
|
| 426 |
-To help you debug or simply view the results of your webhook(s), |
|
| 427 |
-view the "History" of the webhook available on its settings page. |
|
| 428 |
- |
|
| 429 |
-### Callback JSON data |
|
| 430 |
- |
|
| 431 |
-The following parameters are recognized in callback data: |
|
| 432 |
- |
|
| 433 |
-* `state` (required): Accepted values are `success`, `failure` and `error`. |
|
| 434 |
- If the state isn't `success`, the webhook chain will be interrupted. |
|
| 435 |
-* `description`: A string containing miscellaneous information that will be |
|
| 436 |
- available on the Docker Hub. Maximum 255 characters. |
|
| 437 |
-* `context`: A string containing the context of the operation. Can be retrieved |
|
| 438 |
- from the Docker Hub. Maximum 100 characters. |
|
| 439 |
-* `target_url`: The URL where the results of the operation can be found. Can be |
|
| 440 |
- retrieved on the Docker Hub. |
|
| 441 |
- |
|
| 442 |
-*Example callback payload:* |
|
| 443 |
- |
|
| 444 |
- {
|
|
| 445 |
- "state": "success", |
|
| 446 |
- "description": "387 tests PASSED", |
|
| 447 |
- "context": "Continuous integration by Acme CI", |
|
| 448 |
- "target_url": "http://ci.acme.com/results/afd339c1c3d27" |
|
| 449 |
- } |
|
| 450 |
- |
|
| 451 |
-## Repository links |
|
| 452 |
- |
|
| 453 |
-Repository links are a way to associate one Automated Build with |
|
| 454 |
-another. If one gets updated, the linking system triggers a rebuild |
|
| 455 |
-for the other Automated Build. This makes it easy to keep all your |
|
| 456 |
-Automated Builds up to date. |
|
| 457 |
- |
|
| 458 |
-To add a link, go to the repository for the Automated Build you want to |
|
| 459 |
-link to and click on *Repository Links* under the Settings menu at |
|
| 460 |
-right. Then, enter the name of the repository that you want have linked. |
|
| 461 |
- |
|
| 462 |
-> **Warning:** |
|
| 463 |
-> You can add more than one repository link, however, you should |
|
| 464 |
-> do so very carefully. Creating a two way relationship between Automated Builds will |
|
| 465 |
-> cause an endless build loop. |
| 466 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,20 +0,0 @@ |
| 1 |
-<!--[metadata]> |
|
| 2 |
-+++ |
|
| 3 |
-draft = true |
|
| 4 |
-title = "The Docker Hub Registry help" |
|
| 5 |
-description = "The Docker Registry help documentation home" |
|
| 6 |
-keywords = ["Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation"] |
|
| 7 |
-[menu.main] |
|
| 8 |
-parent = "smn_pubhub" |
|
| 9 |
-+++ |
|
| 10 |
-<![end-metadata]--> |
|
| 11 |
- |
|
| 12 |
-# The Docker Hub Registry help |
|
| 13 |
- |
|
| 14 |
-## Introduction |
|
| 15 |
- |
|
| 16 |
-For your questions about the [Docker Hub](https://hub.docker.com) registry you |
|
| 17 |
-can use [this documentation](docs.md). |
|
| 18 |
- |
|
| 19 |
-If you can not find something you are looking for, please feel free to |
|
| 20 |
-[contact us](https://docker.com/resources/support/). |
| 65 | 45 |
deleted file mode 100644 |
| ... | ... |
@@ -1,38 +0,0 @@ |
| 1 |
-<!--[metadata]> |
|
| 2 |
-+++ |
|
| 3 |
-title = "The Docker Hub" |
|
| 4 |
-description = "The Docker Help documentation home" |
|
| 5 |
-keywords = ["Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation, accounts, organizations, repositories, groups"] |
|
| 6 |
-[menu.main] |
|
| 7 |
-parent = "smn_pubhub" |
|
| 8 |
-+++ |
|
| 9 |
-<![end-metadata]--> |
|
| 10 |
- |
|
| 11 |
-# Docker Hub |
|
| 12 |
- |
|
| 13 |
-The [Docker Hub](https://hub.docker.com) provides a cloud-based platform service |
|
| 14 |
-for distributed applications, including container image distribution and change |
|
| 15 |
-management, user and team collaboration, and lifecycle workflow automation. |
|
| 16 |
- |
|
| 17 |
- |
|
| 18 |
- |
|
| 19 |
-## [Finding and pulling images](./userguide.md) |
|
| 20 |
- |
|
| 21 |
-Find out how to [use the Docker Hub](./userguide.md) to find and pull Docker |
|
| 22 |
-images to run or build upon. |
|
| 23 |
- |
|
| 24 |
-## [Accounts](./accounts.md) |
|
| 25 |
- |
|
| 26 |
-[Learn how to create](./accounts.md) a Docker Hub |
|
| 27 |
-account and manage your organizations and groups. |
|
| 28 |
- |
|
| 29 |
-## [Your Repositories](./repos.md) |
|
| 30 |
- |
|
| 31 |
-Find out how to share your Docker images in [Docker Hub |
|
| 32 |
-repositories](./repos.md) and how to store and manage private images. |
|
| 33 |
- |
|
| 34 |
-## [Automated builds](./builds.md) |
|
| 35 |
- |
|
| 36 |
-Learn how to automate your build and deploy pipeline with [Automated |
|
| 37 |
-Builds](./builds.md) |
|
| 38 |
- |
| 39 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,113 +0,0 @@ |
| 1 |
-<!--[metadata]> |
|
| 2 |
-+++ |
|
| 3 |
-title = "Official Repositories on Docker Hub" |
|
| 4 |
-description = "Guidelines for Official Repositories on Docker Hub" |
|
| 5 |
-keywords = ["Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, official, image, documentation"] |
|
| 6 |
-[menu.main] |
|
| 7 |
-parent = "smn_pubhub" |
|
| 8 |
-weight = 4 |
|
| 9 |
-+++ |
|
| 10 |
-<![end-metadata]--> |
|
| 11 |
- |
|
| 12 |
-# Official Repositories on Docker Hub |
|
| 13 |
- |
|
| 14 |
-The Docker [Official Repositories](http://registry.hub.docker.com/official) are |
|
| 15 |
-a curated set of Docker repositories that are promoted on Docker Hub. They are |
|
| 16 |
-designed to: |
|
| 17 |
- |
|
| 18 |
-* Provide essential base OS repositories (for example, |
|
| 19 |
- [`ubuntu`](https://registry.hub.docker.com/_/ubuntu/), |
|
| 20 |
- [`centos`](https://registry.hub.docker.com/_/centos/)) that serve as the |
|
| 21 |
- starting point for the majority of users. |
|
| 22 |
- |
|
| 23 |
-* Provide drop-in solutions for popular programming language runtimes, data |
|
| 24 |
- stores, and other services, similar to what a Platform-as-a-Service (PAAS) |
|
| 25 |
- would offer. |
|
| 26 |
- |
|
| 27 |
-* Exemplify [`Dockerfile` best practices](/articles/dockerfile_best-practices) |
|
| 28 |
- and provide clear documentation to serve as a reference for other `Dockerfile` |
|
| 29 |
- authors. |
|
| 30 |
- |
|
| 31 |
-* Ensure that security updates are applied in a timely manner. This is |
|
| 32 |
- particularly important as many Official Repositories are some of the most |
|
| 33 |
- popular on Docker Hub. |
|
| 34 |
- |
|
| 35 |
-* Provide a channel for software vendors to redistribute up-to-date and |
|
| 36 |
- supported versions of their products. Organization accounts on Docker Hub can |
|
| 37 |
- also serve this purpose, without the careful review or restrictions on what |
|
| 38 |
- can be published. |
|
| 39 |
- |
|
| 40 |
-Docker, Inc. sponsors a dedicated team that is responsible for reviewing and |
|
| 41 |
-publishing all Official Repositories content. This team works in collaboration |
|
| 42 |
-with upstream software maintainers, security experts, and the broader Docker |
|
| 43 |
-community. |
|
| 44 |
- |
|
| 45 |
-While it is preferable to have upstream software authors maintaining their |
|
| 46 |
-corresponding Official Repositories, this is not a strict requirement. Creating |
|
| 47 |
-and maintaining images for Official Repositories is a public process. It takes |
|
| 48 |
-place openly on GitHub where participation is encouraged. Anyone can provide |
|
| 49 |
-feedback, contribute code, suggest process changes, or even propose a new |
|
| 50 |
-Official Repository. |
|
| 51 |
- |
|
| 52 |
-## Should I use Official Repositories? |
|
| 53 |
- |
|
| 54 |
-New Docker users are encouraged to use the Official Repositories in their |
|
| 55 |
-projects. These repositories have clear documentation, promote best practices, |
|
| 56 |
-and are designed for the most common use cases. Advanced users are encouraged to |
|
| 57 |
-review the Official Repositories as part of their `Dockerfile` learning process. |
|
| 58 |
- |
|
| 59 |
-A common rationale for diverging from Official Repositories is to optimize for |
|
| 60 |
-image size. For instance, many of the programming language stack images contain |
|
| 61 |
-a complete build toolchain to support installation of modules that depend on |
|
| 62 |
-optimized code. An advanced user could build a custom image with just the |
|
| 63 |
-necessary pre-compiled libraries to save space. |
|
| 64 |
- |
|
| 65 |
-A number of language stacks such as |
|
| 66 |
-[`python`](https://registry.hub.docker.com/_/python/) and |
|
| 67 |
-[`ruby`](https://registry.hub.docker.com/_/ruby/) have `-slim` tag variants |
|
| 68 |
-designed to fill the need for optimization. Even when these "slim" variants are |
|
| 69 |
-insufficient, it is still recommended to inherit from an Official Repository |
|
| 70 |
-base OS image to leverage the ongoing maintenance work, rather than duplicating |
|
| 71 |
-these efforts. |
|
| 72 |
- |
|
| 73 |
-## How can I get involved? |
|
| 74 |
- |
|
| 75 |
-All Official Repositories contain a **User Feedback** section in their |
|
| 76 |
-documentation which covers the details for that specific repository. In most |
|
| 77 |
-cases, the GitHub repository which contains the Dockerfiles for an Official |
|
| 78 |
-Repository also has an active issue tracker. General feedback and support |
|
| 79 |
-questions should be directed to `#docker-library` on Freenode IRC. |
|
| 80 |
- |
|
| 81 |
-## How do I create a new Official Repository? |
|
| 82 |
- |
|
| 83 |
-From a high level, an Official Repository starts out as a proposal in the form |
|
| 84 |
-of a set of GitHub pull requests. You'll find detailed and objective proposal |
|
| 85 |
-requirements in the following GitHub repositories: |
|
| 86 |
- |
|
| 87 |
-* [docker-library/official-images](https://github.com/docker-library/official-images) |
|
| 88 |
- |
|
| 89 |
-* [docker-library/docs](https://github.com/docker-library/docs) |
|
| 90 |
- |
|
| 91 |
-The Official Repositories team, with help from community contributors, formally |
|
| 92 |
-review each proposal and provide feedback to the author. This initial review |
|
| 93 |
-process may require a bit of back and forth before the proposal is accepted. |
|
| 94 |
- |
|
| 95 |
-There are also subjective considerations during the review process. These |
|
| 96 |
-subjective concerns boil down to the basic question: "is this image generally |
|
| 97 |
-useful?" For example, the [`python`](https://registry.hub.docker.com/_/python/) |
|
| 98 |
-Official Repository is "generally useful" to the large Python developer |
|
| 99 |
-community, whereas an obscure text adventure game written in Python last week is |
|
| 100 |
-not. |
|
| 101 |
- |
|
| 102 |
-When a new proposal is accepted, the author becomes responsible for keeping |
|
| 103 |
-their images up-to-date and responding to user feedback. The Official |
|
| 104 |
-Repositories team becomes responsible for publishing the images and |
|
| 105 |
-documentation on Docker Hub. Updates to the Official Repository follow the same |
|
| 106 |
-pull request process, though with less review. The Official Repositories team |
|
| 107 |
-ultimately acts as a gatekeeper for all changes, which helps mitigate the risk |
|
| 108 |
-of quality and security issues from being introduced. |
|
| 109 |
- |
|
| 110 |
-> **Note**: If you are interested in proposing an Official Repository, but would |
|
| 111 |
-> like to discuss it with Docker, Inc. privately first, please send your |
|
| 112 |
-> inquiries to partners@docker.com. There is no fast-track or pay-for-status |
|
| 113 |
-> option. |
| 114 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,193 +0,0 @@ |
| 1 |
-<!--[metadata]> |
|
| 2 |
-+++ |
|
| 3 |
-title = "Your Repositories on Docker Hub" |
|
| 4 |
-description = "Your Repositories on Docker Hub" |
|
| 5 |
-keywords = ["Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, webhooks, docs, documentation"] |
|
| 6 |
-[menu.main] |
|
| 7 |
-parent = "smn_pubhub" |
|
| 8 |
-weight = 2 |
|
| 9 |
-+++ |
|
| 10 |
-<![end-metadata]--> |
|
| 11 |
- |
|
| 12 |
-# Your Hub repositories |
|
| 13 |
- |
|
| 14 |
-Docker Hub repositories make it possible for you to share images with co-workers, |
|
| 15 |
-customers or the Docker community at large. If you're building your images internally, |
|
| 16 |
-either on your own Docker daemon, or using your own Continuous integration services, |
|
| 17 |
-you can push them to a Docker Hub repository that you add to your Docker Hub user or |
|
| 18 |
-organization account. |
|
| 19 |
- |
|
| 20 |
-Alternatively, if the source code for your Docker image is on GitHub or Bitbucket, |
|
| 21 |
-you can use an "Automated build" repository, which is built by the Docker Hub |
|
| 22 |
-services. See the [automated builds documentation](./builds.md) to read about |
|
| 23 |
-the extra functionality provided by those services. |
|
| 24 |
- |
|
| 25 |
- |
|
| 26 |
- |
|
| 27 |
-Your Docker Hub repositories have a number of useful features. |
|
| 28 |
- |
|
| 29 |
-## Stars |
|
| 30 |
- |
|
| 31 |
-Your repositories can be starred and you can star repositories in |
|
| 32 |
-return. Stars are a way to show that you like a repository. They are |
|
| 33 |
-also an easy way of bookmarking your favorites. |
|
| 34 |
- |
|
| 35 |
-## Comments |
|
| 36 |
- |
|
| 37 |
-You can interact with other members of the Docker community and maintainers by |
|
| 38 |
-leaving comments on repositories. If you find any comments that are not |
|
| 39 |
-appropriate, you can flag them for review. |
|
| 40 |
- |
|
| 41 |
-## Collaborators and their role |
|
| 42 |
- |
|
| 43 |
-A collaborator is someone you want to give access to a private |
|
| 44 |
-repository. Once designated, they can `push` and `pull` to your |
|
| 45 |
-repositories. They will not be allowed to perform any administrative |
|
| 46 |
-tasks such as deleting the repository or changing its status from |
|
| 47 |
-private to public. |
|
| 48 |
- |
|
| 49 |
-> **Note:** |
|
| 50 |
-> A collaborator cannot add other collaborators. Only the owner of |
|
| 51 |
-> the repository has administrative access. |
|
| 52 |
- |
|
| 53 |
-You can also assign more granular collaborator rights ("Read", "Write", or "Admin")
|
|
| 54 |
-on Docker Hub by using organizations and groups. For more information |
|
| 55 |
-see the [accounts documentation](accounts/). |
|
| 56 |
- |
|
| 57 |
-## Private repositories |
|
| 58 |
- |
|
| 59 |
-Private repositories allow you to have repositories that contain images |
|
| 60 |
-that you want to keep private, either to your own account or within an |
|
| 61 |
-organization or group. |
|
| 62 |
- |
|
| 63 |
-To work with a private repository on [Docker |
|
| 64 |
-Hub](https://hub.docker.com), you will need to add one via the [Add |
|
| 65 |
-Repository](https://registry.hub.docker.com/account/repositories/add/) |
|
| 66 |
-link. You get one private repository for free with your Docker Hub |
|
| 67 |
-account. If you need more accounts you can upgrade your [Docker |
|
| 68 |
-Hub](https://registry.hub.docker.com/plans/) plan. |
|
| 69 |
- |
|
| 70 |
-Once the private repository is created, you can `push` and `pull` images |
|
| 71 |
-to and from it using Docker. |
|
| 72 |
- |
|
| 73 |
-> *Note:* You need to be signed in and have access to work with a |
|
| 74 |
-> private repository. |
|
| 75 |
- |
|
| 76 |
-Private repositories are just like public ones. However, it isn't |
|
| 77 |
-possible to browse them or search their content on the public registry. |
|
| 78 |
-They do not get cached the same way as a public repository either. |
|
| 79 |
- |
|
| 80 |
-It is possible to give access to a private repository to those whom you |
|
| 81 |
-designate (i.e., collaborators) from its Settings page. From there, you |
|
| 82 |
-can also switch repository status (*public* to *private*, or |
|
| 83 |
-vice-versa). You will need to have an available private repository slot |
|
| 84 |
-open before you can do such a switch. If you don't have any available, |
|
| 85 |
-you can always upgrade your [Docker |
|
| 86 |
-Hub](https://registry.hub.docker.com/plans/) plan. |
|
| 87 |
- |
|
| 88 |
-## Webhooks |
|
| 89 |
- |
|
| 90 |
-A webhook is an HTTP call-back triggered by a specific event. |
|
| 91 |
-You can use a Hub repository webhook to notify people, services, and other |
|
| 92 |
-applications after a new image is pushed to your repository (this also happens |
|
| 93 |
-for Automated builds). For example, you can trigger an automated test or |
|
| 94 |
-deployment to happen as soon as the image is available. |
|
| 95 |
- |
|
| 96 |
-To get started adding webhooks, go to the desired repository in the Hub, |
|
| 97 |
-and click "Webhooks" under the "Settings" box. |
|
| 98 |
-A webhook is called only after a successful `push` is |
|
| 99 |
-made. The webhook calls are HTTP POST requests with a JSON payload |
|
| 100 |
-similar to the example shown below. |
|
| 101 |
- |
|
| 102 |
-*Example webhook JSON payload:* |
|
| 103 |
- |
|
| 104 |
-``` |
|
| 105 |
-{
|
|
| 106 |
- "callback_url": "https://registry.hub.docker.com/u/svendowideit/busybox/hook/2141bc0cdec4hebec411i4c1g40242eg110020/", |
|
| 107 |
- "push_data": {
|
|
| 108 |
- "images": [ |
|
| 109 |
- "27d47432a69bca5f2700e4dff7de0388ed65f9d3fb1ec645e2bc24c223dc1cc3", |
|
| 110 |
- "51a9c7c1f8bb2fa19bcd09789a34e63f35abb80044bc10196e304f6634cc582c", |
|
| 111 |
- ... |
|
| 112 |
- ], |
|
| 113 |
- "pushed_at": 1.417566822e+09, |
|
| 114 |
- "pusher": "svendowideit" |
|
| 115 |
- }, |
|
| 116 |
- "repository": {
|
|
| 117 |
- "comment_count": 0, |
|
| 118 |
- "date_created": 1.417566665e+09, |
|
| 119 |
- "description": "", |
|
| 120 |
- "full_description": "webhook triggered from a 'docker push'", |
|
| 121 |
- "is_official": false, |
|
| 122 |
- "is_private": false, |
|
| 123 |
- "is_trusted": false, |
|
| 124 |
- "name": "busybox", |
|
| 125 |
- "namespace": "svendowideit", |
|
| 126 |
- "owner": "svendowideit", |
|
| 127 |
- "repo_name": "svendowideit/busybox", |
|
| 128 |
- "repo_url": "https://registry.hub.docker.com/u/svendowideit/busybox/", |
|
| 129 |
- "star_count": 0, |
|
| 130 |
- "status": "Active" |
|
| 131 |
-} |
|
| 132 |
-``` |
|
| 133 |
- |
|
| 134 |
-<TODO: does it tell you what tag was updated?> |
|
| 135 |
- |
|
| 136 |
-For testing, you can try an HTTP request tool like [requestb.in](http://requestb.in/). |
|
| 137 |
- |
|
| 138 |
-> **Note**: The Docker Hub servers use an elastic IP range, so you can't |
|
| 139 |
-> filter requests by IP. |
|
| 140 |
- |
|
| 141 |
-### Webhook chains |
|
| 142 |
- |
|
| 143 |
-Webhook chains allow you to chain calls to multiple services. For example, |
|
| 144 |
-you can use this to trigger a deployment of your container only after |
|
| 145 |
-it has been successfully tested, then update a separate Changelog once the |
|
| 146 |
-deployment is complete. |
|
| 147 |
-After clicking the "Add webhook" button, simply add as many URLs as necessary |
|
| 148 |
-in your chain. |
|
| 149 |
- |
|
| 150 |
-The first webhook in a chain will be called after a successful push. Subsequent |
|
| 151 |
-URLs will be contacted after the callback has been validated. |
|
| 152 |
- |
|
| 153 |
-### Validating a callback |
|
| 154 |
- |
|
| 155 |
-In order to validate a callback in a webhook chain, you need to |
|
| 156 |
- |
|
| 157 |
-1. Retrieve the `callback_url` value in the request's JSON payload. |
|
| 158 |
-1. Send a POST request to this URL containing a valid JSON body. |
|
| 159 |
- |
|
| 160 |
-> **Note**: A chain request will only be considered complete once the last |
|
| 161 |
-> callback has been validated. |
|
| 162 |
- |
|
| 163 |
-To help you debug or simply view the results of your webhook(s), |
|
| 164 |
-view the "History" of the webhook available on its settings page. |
|
| 165 |
- |
|
| 166 |
-#### Callback JSON data |
|
| 167 |
- |
|
| 168 |
-The following parameters are recognized in callback data: |
|
| 169 |
- |
|
| 170 |
-* `state` (required): Accepted values are `success`, `failure` and `error`. |
|
| 171 |
- If the state isn't `success`, the webhook chain will be interrupted. |
|
| 172 |
-* `description`: A string containing miscellaneous information that will be |
|
| 173 |
- available on the Docker Hub. Maximum 255 characters. |
|
| 174 |
-* `context`: A string containing the context of the operation. Can be retrieved |
|
| 175 |
- from the Docker Hub. Maximum 100 characters. |
|
| 176 |
-* `target_url`: The URL where the results of the operation can be found. Can be |
|
| 177 |
- retrieved on the Docker Hub. |
|
| 178 |
- |
|
| 179 |
-*Example callback payload:* |
|
| 180 |
- |
|
| 181 |
- {
|
|
| 182 |
- "state": "success", |
|
| 183 |
- "description": "387 tests PASSED", |
|
| 184 |
- "context": "Continuous integration by Acme CI", |
|
| 185 |
- "target_url": "http://ci.acme.com/results/afd339c1c3d27" |
|
| 186 |
- } |
|
| 187 |
- |
|
| 188 |
-## Mark as unlisted |
|
| 189 |
- |
|
| 190 |
-By marking a repository as unlisted, you can create a publicly pullable repository |
|
| 191 |
-which will not be in the Hub or commandline search. This allows you to have a limited |
|
| 192 |
-release, but does not restrict access to anyone that is told, or guesses the repository |
|
| 193 |
-name. |
| 194 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,63 +0,0 @@ |
| 1 |
-<!--[metadata]> |
|
| 2 |
-+++ |
|
| 3 |
-title = "Docker Hub user guide" |
|
| 4 |
-description = "Docker Hub user guide" |
|
| 5 |
-keywords = ["Docker, docker, registry, Docker Hub, docs, documentation"] |
|
| 6 |
-[menu.main] |
|
| 7 |
-parent = "smn_pubhub" |
|
| 8 |
-+++ |
|
| 9 |
-<![end-metadata]--> |
|
| 10 |
- |
|
| 11 |
-# Using the Docker Hub |
|
| 12 |
- |
|
| 13 |
-Docker Hub is used to find and pull Docker images to run or build upon, and to |
|
| 14 |
-distribute and build images for other users to use. |
|
| 15 |
- |
|
| 16 |
- |
|
| 17 |
- |
|
| 18 |
-## Finding repositories and images |
|
| 19 |
- |
|
| 20 |
-There are two ways you can search for public repositories and images available |
|
| 21 |
-on the Docker Hub. You can use the "Search" tool on the Docker Hub website, or |
|
| 22 |
-you can `search` for all the repositories and images using the Docker commandline |
|
| 23 |
-tool: |
|
| 24 |
- |
|
| 25 |
- $ docker search ubuntu |
|
| 26 |
- |
|
| 27 |
-Both will show you a list of the currently available public repositories on the |
|
| 28 |
-Docker Hub which match the provided keyword. |
|
| 29 |
- |
|
| 30 |
-If a repository is private or marked as unlisted, it won't be in the repository |
|
| 31 |
-search results. To see all the repositories you have access to and their statuses, |
|
| 32 |
-you can look at your profile page on [Docker Hub](https://hub.docker.com). |
|
| 33 |
- |
|
| 34 |
-## Pulling, running and building images |
|
| 35 |
- |
|
| 36 |
-You can find more information on [working with Docker images](../userguide/dockerimages.md). |
|
| 37 |
- |
|
| 38 |
-## Official Repositories |
|
| 39 |
- |
|
| 40 |
-The Docker Hub contains a number of [Official |
|
| 41 |
-Repositories](http://registry.hub.docker.com/official). These are |
|
| 42 |
-certified repositories from vendors and contributors to Docker. They |
|
| 43 |
-contain Docker images from vendors like Canonical, Oracle, and Red Hat |
|
| 44 |
-that you can use to build applications and services. |
|
| 45 |
- |
|
| 46 |
-If you use Official Repositories you know you're using an optimized and |
|
| 47 |
-up-to-date image to power your applications. |
|
| 48 |
- |
|
| 49 |
-> **Note:** |
|
| 50 |
-> If you would like to contribute an Official Repository for your |
|
| 51 |
-> organization, see [Official Repositories on Docker |
|
| 52 |
-> Hub](/docker-hub/official_repos) for more information. |
|
| 53 |
- |
|
| 54 |
-## Building and shipping your own repositories and images |
|
| 55 |
- |
|
| 56 |
-The Docker Hub provides you and your team with a place to build and ship Docker images. |
|
| 57 |
- |
|
| 58 |
-Collections of Docker images are managed using repositories - |
|
| 59 |
- |
|
| 60 |
-You can configure two types of repositories to manage on the Docker Hub: |
|
| 61 |
-[Repositories](./repos.md), which allow you to push images to the Hub from your local Docker daemon, |
|
| 62 |
-and [Automated Builds](./builds.md), which allow you to configure GitHub or Bitbucket to |
|
| 63 |
-trigger the Hub to rebuild repositories when changes are made to the repository. |
| 64 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,78 +0,0 @@ |
| 1 |
-<!--[metadata]> |
|
| 2 |
-+++ |
|
| 3 |
-title = "Getting started with Docker Hub" |
|
| 4 |
-description = "Introductory guide to getting an account on Docker Hub" |
|
| 5 |
-keywords = ["documentation, docs, the docker guide, docker guide, docker, docker platform, virtualization framework, docker.io, central service, services, how to, container, containers, automation, collaboration, collaborators, registry, repo, repository, technology, github webhooks, trusted builds"] |
|
| 6 |
-[menu.main] |
|
| 7 |
-parent = "smn_pubhub" |
|
| 8 |
-weight = 1 |
|
| 9 |
-+++ |
|
| 10 |
-<![end-metadata]--> |
|
| 11 |
- |
|
| 12 |
-# Getting started with Docker Hub |
|
| 13 |
- |
|
| 14 |
- |
|
| 15 |
-This section provides a quick introduction to the [Docker Hub](https://hub.docker.com), |
|
| 16 |
-including how to create an account. |
|
| 17 |
- |
|
| 18 |
-The [Docker Hub](https://hub.docker.com) is a centralized resource for working with |
|
| 19 |
-Docker and its components. Docker Hub helps you collaborate with colleagues and get the |
|
| 20 |
-most out of Docker. To do this, it provides services such as: |
|
| 21 |
- |
|
| 22 |
-* Docker image hosting. |
|
| 23 |
-* User authentication. |
|
| 24 |
-* Automated image builds and work-flow tools such as build triggers and web |
|
| 25 |
- hooks. |
|
| 26 |
-* Integration with GitHub and Bitbucket. |
|
| 27 |
- |
|
| 28 |
-In order to use Docker Hub, you will first need to register and create an account. Don't |
|
| 29 |
-worry, creating an account is simple and free. |
|
| 30 |
- |
|
| 31 |
-## Creating a Docker Hub account |
|
| 32 |
- |
|
| 33 |
-There are two ways for you to register and create an account: |
|
| 34 |
- |
|
| 35 |
-1. Via the web, or |
|
| 36 |
-2. Via the command line. |
|
| 37 |
- |
|
| 38 |
-### Register via the web |
|
| 39 |
- |
|
| 40 |
-Fill in the [sign-up form](https://hub.docker.com/account/signup/) by |
|
| 41 |
-choosing your user name and password and entering a valid email address. You can also |
|
| 42 |
-sign up for the Docker Weekly mailing list, which has lots of information about what's |
|
| 43 |
-going on in the world of Docker. |
|
| 44 |
- |
|
| 45 |
- |
|
| 46 |
- |
|
| 47 |
-### Register via the command line |
|
| 48 |
- |
|
| 49 |
-You can also create a Docker Hub account via the command line with the |
|
| 50 |
-`docker login` command. |
|
| 51 |
- |
|
| 52 |
- $ docker login |
|
| 53 |
- |
|
| 54 |
-### Confirm your email |
|
| 55 |
- |
|
| 56 |
-Once you've filled in the form, check your email for a welcome message asking for |
|
| 57 |
-confirmation so we can activate your account. |
|
| 58 |
- |
|
| 59 |
- |
|
| 60 |
-### Login |
|
| 61 |
- |
|
| 62 |
-After you complete the confirmation process, you can login using the web console: |
|
| 63 |
- |
|
| 64 |
- |
|
| 65 |
- |
|
| 66 |
-Or via the command line with the `docker login` command: |
|
| 67 |
- |
|
| 68 |
- $ docker login |
|
| 69 |
- |
|
| 70 |
-Your Docker Hub account is now active and ready to use. |
|
| 71 |
- |
|
| 72 |
-## Next steps |
|
| 73 |
- |
|
| 74 |
-Next, let's start learning how to Dockerize applications with our "Hello world" |
|
| 75 |
-exercise. |
|
| 76 |
- |
|
| 77 |
-Go to [Dockerizing Applications](/userguide/dockerizing). |
|
| 78 |
- |
| ... | ... |
@@ -82,8 +82,7 @@ You now have an image from which you can run containers. |
| 82 | 82 |
|
| 83 | 83 |
Anyone can pull public images from the [Docker Hub](https://hub.docker.com) |
| 84 | 84 |
registry, but if you would like to share your own images, then you must |
| 85 |
-register first, as we saw in the [first section of the Docker User |
|
| 86 |
-Guide](/userguide/dockerhub/). |
|
| 85 |
+[register first](/docker-hub/accounts). |
|
| 87 | 86 |
|
| 88 | 87 |
## Pushing a repository to Docker Hub |
| 89 | 88 |
|
| ... | ... |
@@ -33,7 +33,7 @@ Docker Hub is the central hub for Docker. It hosts public Docker images |
| 33 | 33 |
and provides services to help you build and manage your Docker |
| 34 | 34 |
environment. To learn more: |
| 35 | 35 |
|
| 36 |
-Go to [Using Docker Hub](/userguide/dockerhub). |
|
| 36 |
+Go to [Using Docker Hub](/docker-hub). |
|
| 37 | 37 |
|
| 38 | 38 |
## Dockerizing applications: A "Hello world" |
| 39 | 39 |
|