Re-write Orgs & Webhooks docs

This commit is contained in:
Jeffrey Morgan
2018-11-22 16:16:13 -05:00
parent dc62a08d60
commit 435a720308
32 changed files with 181 additions and 203 deletions

View File

@@ -3628,17 +3628,19 @@ manuals:
- sectiontitle: Docker Hub
section:
- path: /docker-hub/
title: Get Started
- path: /docker-hub/accounts/
title: Docker ID
title: Quickstart
- path: /docker-hub/repos/
title: Public Repositories
title: Repositories
- path: /docker-hub/official_images/
title: Official Images
- path: /docker-hub/orgs/
title: Teams & Organizations
- path: /docker-hub/upgrade/
title: Upgrading your plan
- path: /docker-hub/webhooks/
title: Repository Webhooks
title: Webhooks
- path: /docker-hub/slack_integration/
title: Slack Integration
- sectiontitle: Builds
section:
- path: /docker-hub/builds/

View File

@@ -1,27 +0,0 @@
---
description: Using Docker Hub with your Docker ID account
keywords: Docker, docker, trusted, sign-up, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation
title: Use Docker Hub with Docker ID
---
Docker Hub uses [Docker ID](../docker-id/) to save your account
settings, and as your account namespace. If you don't yet have a Docker ID, you
can [register for one](https://hub.docker.com/signup).
You can `search` Docker Hub and `pull` images without an account and
without signing in. However, to `push` images, leave comments, or to *star* a
repository, you need to log in using a Docker ID.
Once you have a personal Docker ID, you can also create or join
Docker Hub [Organizations and Teams](orgs.md).
## Upgrade your account
Free Docker Hub accounts include one private registry. If you need more private
registries, you can [upgrade your account](https://hub.docker.com/account/billing-plans/) to a paid plan directly
from the Hub.
## Password reset process
If you forget your password, or can't access your account, you
can reset your password from the [*Password Reset*](https://hub.docker.com/reset-password/) page.

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -1,10 +1,11 @@
---
description: Get Started with Docker Hub
description: Docker Hub Quickstart
keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation, accounts, organizations, repositories, groups, teams
title: Get Started with Docker Hub
title: Docker Hub Quickstart
redirect_from:
- /docker-hub/overview/
- /apidocs/docker-cloud/
- /docker-cloud/
- /docker-cloud/migration/
- /docker-cloud/migration/cloud-to-swarm/
- /docker-cloud/migration/cloud-to-kube-aks/
@@ -72,84 +73,82 @@ redirect_from:
- /docker-cloud/docker-errors-faq/
- /docker-cloud/release-notes/
- /docker-store/
---
[Docker Hub](https://hub.docker.com) is a service provided by Docker for finding and sharing container images with your team.
![Docker Hub Landing Page](/docker-hub/images/getting-started.png)
Docker Hub provides the following major features:
* [Repositories](/docker-hub/repos.md): Push and pull container images. Private
repositories allow you to share container images with your team. Public
repositories allow you to share them with anyone.
* [Teams & Organizations](/docker-hub/orgs.md): Manage access to private repositories.
[Docker Hub](https://hub.docker.com) is a service provided by Docker for finding and sharing container images with your team. It provides the following major features:
* [Repositories](/docker-hub/repos.md): Push and pull container images.
* [Teams & Organizations](/docker-hub/orgs.md): Manage access to private repositories of container images.
* [Official Images](/docker-hub/official_images.md): Pull & use high-quality container images provided by Docker.
* [Publisher Images](/docker-hub/publish/customer_faq.md): Pull & use high-quality container
images provided by external vendors. Certified images also include support and guarantee
compatibility with Docker Enterprise.
* [Builds](/docker-hub/builds.md): Automatically build container images and push them to your repositories when you make changes to code in GitHub or BitBucket.
* [Builds](/docker-hub/builds.md): Automatically build container images from GitHub and Bitbucket and push them to Docker Hub
* [Webhooks](/docker-hub/webhooks.md): Trigger actions after a successful push
to a repository to integrate Docker Hub with other services.
## Sign up for Docker Hub
Start by creating an [account](/docker-hub/accounts.md) at [https://hub.docker.com](https://hub.docker.com).
### Step 1: Sign up for Docker Hub
> **Note**: You can search for and pull Docker images from Hub without logging
> in, however to push images or share them with your team, you must log in.
Start by [creating an account](https://hub.docker.com/signup).
## Find & Pull an Official Image
Docker Hub contains a number of [Official
Repositories](http://hub.docker.com/explore/). These are curated repositories from vendors and contributors to Docker. They contain Docker images from vendors like Canonical, Oracle, and Elastic that you can use as the basis to build your applications and services.
With Official Images you know you're using an optimized and
up-to-date image that was built by experts to power your applications.
> **Note**: If you would like to contribute an Official Image for your
> organization or product, see the documentation on
> [Official Images on Docker Hub](/docker-hub/official_images.md) for more
> information.
## Create your first repository and push an image to it
### Step 2: Create your first repository
To create a repo:
1. Log into [Docker Hub](https://hub.docker.com)
2. Click on Create Repositories on the home page:
3. Name it <your namespace>/<redis>
1. Sign in to [Docker Hub](https://hub.docker.com)
2. Click on Create Repository on the Docker Hub welcome page:
Next, we'll push an images
![Welcome](images/index-welcome.png)
1. Download [Docker Desktop](https://docker.com/get-started)
2. `docker pull redis` to pull the Official **redis** image from Docker Hub
3. `docker tag redis <namespace>/redis`
4. `docker push <namespace>/redis`
3. Name it **<your_username>/my-first-repo** as shown below. Select **Private**:
(insert pic here)
![Create Repository](images/index-create-repo.png)
## Upgrading your Plan
You've created your first repo. You should see:
Your Docker ID includes one private Docker Hub repository for free. If you need
more private repositories, you can upgrade from your free account to a paid
plan.
![Repository Created](images/index-repo-created.png)
To upgrade, log in to Docker Hub and click [Upgrade Plan](https://hub.docker.com/account/billing-plans/), in the dropdown menu.
### Step 3: Download and install Docker Desktop
(insert pic here)
We'll need to download Docker Desktop to build and push a container image to Docker Hub.
1. Download and install [Docker Desktop](https://docker.com/get-started). If on Linux, download [Docker Engine - Community](https://hub.docker.com/search?type=edition&offering=community)
2. Open the terminal and sign in to Docker Hub on your computer by running `docker login`
### Step 4: Build and push an image to Docker Hub from your computer
1. Create a Dockerfile to specify your application by running:
```shell
cat > Dockerfile <<EOF
FROM busybox
CMD echo "Hello world! This is my first Docker image."
EOF
```
More on Dockerfiles [here](https://docs.docker.com/engine/reference/builder/)
2. Run `docker build -t <your_username>/my-first-repo .` to build your Docker image
3. Test your docker image locally by running `docker run <your_username>/my-first-repo`
4. Run `docker push <your_username>/my-first-repo` to push your Docker image to Docker Hub
You should see something similar to:
![Terminal](images/index-terminal.png)
And in Docker Hub, your repository should have a new `latest` tag available under **Tags**:
![Tag Created](images/index-tag.png)
Congratulations! You've successfully:
- Signed up for Docker Hub
- Created your first repository
- Built a Docker image on your computer
- Pushed it to Docker Hub
### Next Steps
You've successfully create a repo and pushed a Docker image to it. Next:
- Create an [Organization](/docker-hub/orgs.md) to use Docker Hub with your team.
- Automatically build container images from code via [Builds](/docker-hub/builds/index.md).
- Create an [Organization](orgs.md) to use Docker Hub with your team.
- Automatically build container images from code via [Builds](builds/index.md).
- [Explore](https://hub.docker.com/explore) Official & Publisher Images
### Docker Commands to Interact with Docker Hub
Docker itself provides access to Docker Hub services via the
[`docker search`](/engine/reference/commandline/search.md),
[`pull`](/engine/reference/commandline/pull.md),
[`login`](/engine/reference/commandline/login.md), and
[`push`](/engine/reference/commandline/push.md) commands.
- [Upgrade your plan](upgrade.md) to push additional private Docker images to Docker Hub

View File

@@ -1,57 +1,88 @@
---
description: Docker Hub Teams and Organizations
description: Docker Hub Teams & Organizations
keywords: Docker, docker, registry, teams, organizations, plans, Dockerfile, Docker Hub, docs, documentation
title: Organizations and teams in Docker Hub
title: Teams & Organizations
redirect_from:
- /docker-cloud/orgs/
---
Docker Hub [organizations](https://hub.docker.com/organizations/) let you create
teams so you can give colleagues access to shared image repositories. A Docker
Hub organization can contain public and private repositories just like a user
account. Access to push or pull for these repositories is allocated by defining
teams of users and then assigning team rights to specific repositories.
Repository creation is limited to users in the organization owner's group. This
allows you to distribute limited access Docker images, and to select which
Docker Hub users can publish new images.
Docker Hub Organizations let you create teams so you can give your team access to shared image repositories.
### Create an organization
### How Organizations & Teams Work
You can see which organizations you belong to and add new organizations by
clicking **Organizations** in the top nav bar.
- **Organizations** are a collection of teams and repositories that can be managed together.
- **Teams** are groups of Docker Hub users that belong to your organization.
![organizations](images/orgs.png)
**Note:** in Docker Hub, users cannot be associated directly to an organization. They below only to teams within an the organization.
### Create a team
### Creating an organization
Users in the "Owners" team of an organization can create and modify the
membership of all teams.
1. Start by clicking on [Organizations](https://cloud.docker.com/orgs) in Docker Hub
2. Click on "Create Organization"
3. Provide information about your organization:
Other users can only see teams they belong to.
![Create Organization](images/orgs-create.png)
![teams](images/groups.png)
You've created an organization. You'll see you have a team, the **owners** team with a single member (you!)
### Add a member to a team
### The owners team
### Manage team permissions
The **owners** team is a special team that has full access to all repositories in the Organization.
Use teams to manage who can interact with your repositories.
Members of this team can:
- Manage Organization settings and billing.
- Create a team and modify the membership of any team
- Access and modify any repository belonging to the Organization
You need to be a member of the organization's "Owners" team to create a new
team, Hub repository, or automated build. As an "Owner", you then delegate the
following repository access rights to a team using the "Collaborators" section
of the repository view.
### Creating a team
To create a team:
1. Go to your organization by clicking on **Organizations** in Docker Hub, and select your organization.
2. Click **Create Team** ![Create Team](images/orgs-team-create.png)
3. Fill out your team's information and click **Create** ![Create Modal](images/orgs-team-create-submit.png)
### Adding a member to a team
1. Visit your team's page in Docker Hub. Click on **Organizations** > **_Your Organization_** > **_Your Team Name_**
2. Click on **Add User**
3. Provide the user's Docker ID username _or_ email to add them to the team ![Add User to Team](images/orgs-team-add-user.png)
**Note:** you are not automatically added to teams created by your.
### Removing team members
To remove a member from a team, click the **x** next to their name:
![Add User to Team](images/orgs-team-remove-user.png)
### Giving a team access to a repository
To provide a team to access a repository:
1. Visit the repository list on Docker Hub by clicking on **Repositories**
2. Select your organization in the namespace dropdown list
3. Click the repository you'd like to edit ![Org Repos](images/orgs-list-repos.png)
4. Click the **Permissions** tab
5. Select the team, permissions level (more on this below) and click **+**
6. Click the **+** button to add ![Add Repo Permissions for Team](images/orgs-add-team-permissions.png)
### Viewing a team's permissions for all repositories
To view a team's permissions over all repos:
1. Click on **Organizations**, then select your organization and team.
2. Click on the **Permissions** tab where you can view which repositories this team has access to ![Team Audit Permissions](images/orgs-audit-permissions.png)
### Permissions Reference
Permissions are cumulative. For example, if you have Write permissions, you
automatically have Read permissions:
- `Read` access allows users to view, search, and pull a private repository in the same way as they can a public repository.
- `Write` access allows users to push to non-automated repositories on the Docker Hub.
- `Write` access allows users to push to repositories on Docker Hub.
- `Admin` access allows users to modify the repositories "Description", "Collaborators" rights, "Public/Private" visibility and "Delete".
> **Note**: A User who has not yet verified their email address only has
> `Read` access to the repository, regardless of the rights their team
> membership has given them.
![Organization repository collaborators](images/org-repo-collaborators.png)

View File

@@ -1,19 +1,11 @@
---
description: Your Repositories on Docker Hub
description: Using repositories on Docker Hub
keywords: Docker, docker, trusted, registry, accounts, plans, Dockerfile, Docker Hub, webhooks, docs, documentation
title: Repositories on Docker Hub
title: Repositories
---
Docker Hub repositories let you share images with co-workers, customers, or the
Docker community at large. If you're building your images internally, either on
your own Docker daemon, or using your own Continuous integration services, you
can push them to a Docker Hub repository that you add to your Docker Hub user or
organization account.
Alternatively, if the source code for your Docker image is on GitHub or
Bitbucket, you can use an "Automated build" repository, which is built by the
Docker Hub services. See the [automated builds documentation](/docker-hub/builds.md) to read
about the extra functionality provided by those services.
Docker community at large.
![repositories](/docker-hub/images/repos.png)
@@ -160,69 +152,6 @@ repository's status between public and private, if you have an available
repository slot open. Otherwise, you can upgrade your
[Docker Hub](https://hub.docker.com/account/billing-plans/) plan.
## Webhooks
A webhook is an HTTP call-back triggered by a specific event. You can use a Hub
repository webhook to notify people, services, and other applications after a
new image is pushed to your repository (this also happens for Automated builds).
For example, you can trigger an automated test or deployment to happen as soon
as the image is available.
To get started adding webhooks, go to the desired repository in the Hub, and
click "Webhooks" under the "Settings" box. A webhook is called only after a
successful `push` is made. The webhook calls are HTTP POST requests with a JSON
payload similar to the example shown below.
*Example webhook JSON payload:*
```json
{
"callback_url": "https://registry.hub.docker.com/u/svendowideit/busybox/hook/2141bc0cdec4hebec411i4c1g40242eg110020/",
"push_data": {
"images": [
"27d47432a69bca5f2700e4dff7de0388ed65f9d3fb1ec645e2bc24c223dc1cc3",
"51a9c7c1f8bb2fa19bcd09789a34e63f35abb80044bc10196e304f6634cc582c",
"..."
],
"pushed_at": 1.417566822e+09,
"pusher": "svendowideit"
},
"repository": {
"comment_count": 0,
"date_created": 1.417566665e+09,
"description": "",
"full_description": "webhook triggered from a 'docker push'",
"is_official": false,
"is_private": false,
"is_trusted": false,
"name": "busybox",
"namespace": "svendowideit",
"owner": "svendowideit",
"repo_name": "svendowideit/busybox",
"repo_url": "https://registry.hub.docker.com/u/svendowideit/busybox/",
"star_count": 0,
"status": "Active"
}
}
```
<!-- TODO: does it tell you what tag was updated? -->
>**Note**: If you want to test your webhook, we recommend using a tool like
>[requestb.in](http://requestb.in/). Also note, the Docker Hub server can't be
>filtered by IP address.
### Webhook chains
Webhook chains allow you to chain calls to multiple services. For example, you
can use this to trigger a deployment of your container only after it has been
successfully tested, then update a separate Changelog once the deployment is
complete. After clicking the "Add webhook" button, simply add as many URLs as
necessary in your chain.
The first webhook in a chain is called after a successful push. Subsequent
URLs are contacted after the callback has been validated.
### Validating a callback
To validate a callback in a webhook chain, you need to

25
docker-hub/upgrade.md Normal file
View File

@@ -0,0 +1,25 @@
---
description: Upgrading your Docker Hub Plan
keywords: Docker, docker, trusted, registry, accounts, plans, Dockerfile, Docker Hub, webhooks, docs, documentation
title: Upgrading your Plan
---
### Upgrading your personal plan
Docker Hub includes one private Docker Hub repository for free. If you need
more private repositories, you can upgrade from your free account to a paid
plan.
To upgrade:
1. Visit the [Plans Page](https://hub.docker.com/account/billing-plans/)
2. Click Change Plan
3. Select your plan and provide your payment information to upgrade ![Upgrade Plan](images/index-upgrade-plan.png)
### Upgrading your organization's plan
To upgrade an Organization's plan:
1. Visit the [Plans Page](https://hub.docker.com/account/billing-plans/)
2. Change the selected account to your Organization whose plan you'd like to upgrade ![Change Account](images/upgrade-change-account.png)
3. Click Change Plan ![Change Plan](images/upgrade-change-plan.png)

View File

@@ -1,20 +1,36 @@
---
description: Docker Hub Automated Builds
description: Docker Hub Webhooks
keywords: Docker, webhookds, hub, builds
title: Webhooks for automated builds
title: Docker Hub Webhooks
---
If you have an automated build repository in Docker Hub, you can use Webhooks to
cause an action in another application in response to an event in the
repository. Webhook is a POST request sent to a defined URL which provides the service. Docker Hub webhooks fire when an image is built in, or a new tag
is added to, your automated build repository.
You can use Webhooks to cause an action in another service in response to a push event in the repository. Webhooks are POST requests sent to a URL you define in Docker Hub.
Configure webhooks on `https://hub.docker.com/r/<USERNAME>/<REPOSITORY>/~/settings/webhooks/`.
Configure Webhooks via the "Webhooks" tab on your Docker Hub repository:
![Create Webhook](/docker-hub/images/webhooks.png)
![Webhooks Page](images/webhooks-empty.png)
With your webhook, you specify a target URL to POST to. Docker Hub POSTs the URL
with the following payload:
### Creating Webhooks
To create a Webhook, visit the Webhooks tab for your repository. Then:
1. Provide a name for the Webhooks
2. Provide a destination Webhook URL. This is where webhook POST requests will be delivered:
![Webhooks Create](images/webhooks-create.png)
### Viewing Webhook Delivery History
You can view Webhook Delivery History by clicking on the submenu of the Webhook and then clicking "View History"
![Webhooks View History](images/webhooks-submenu.png)
You can then view the delivery history, and wether delivering the POST request was successful or failed:
![Webhooks History](images/webhooks-history.png)
### Example Webhook Payload
Docker Hub Webhook payloads have the following payload JSON format:
```json
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

BIN
docker-id/images/login.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

View File

@@ -4,6 +4,7 @@ keywords: accounts, docker ID, billing, paid plans, support, Hub, Store, Forums,
title: Docker ID accounts
redirect_from:
- /docker-cloud/dockerid/
- /docker-hub/accounts/
---
Your free Docker ID grants you access to Docker Hub repositories, and some beta programs. All you need is an email address.
@@ -40,6 +41,8 @@ Your Docker ID becomes your user namespace for hosted Docker services, and becom
Once you register and verify your Docker ID email address, you can log in
to [Docker Hub](https://hub.docker.com) and [Docker Support](https://support.docker.com).
![Login](images/login.png)
You can also log in using the `docker login` command. (You can read more about `docker login` [here](/engine/reference/commandline/login.md).)
> **Warning**: