1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/docs/sources/docker-io/builds.md
James Turnbull a8871b93b9 Addressed regression of private repository documentation.
This adds back in the references to private repositories and
provides some refactoring to the Working with repositories
documentation including updating references to the "Central"
registry to Docker.io.

It also:

* Fixes some links and references to Central Index
* Fixes anchors in other files to updated titles in Working with Repositories.
* Renamed Central Index in the remaining places.
* Updated terms documentation to reflect Docker.io
* Updated some Docker Index naming to be consistent.
* Updates menu labels and hyperlinks.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)
2014-04-28 16:08:55 -04:00

5.3 KiB

page_title: Trusted Builds on Docker.io page_description: Docker.io Trusted Builds page_keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker.io, docs, documentation, trusted, builds, trusted builds

Trusted Builds on Docker.io

Trusted Builds

Trusted Builds is a special feature allowing you to specify a source repository with a Dockerfile to be built by the Docker build clusters. The system will clone your repository and build the Dockerfile using the repository as the context. The resulting image will then be uploaded to the registry and marked as a Trusted Build.

Trusted Builds have a number of advantages. For example, users of your Trusted Build can be certain that the resulting image was built exactly how it claims to be.

Furthermore, the Dockerfile will be available to anyone browsing your repository on the registry. Another advantage of the Trusted Builds feature is the automated builds. This makes sure that your repository is always up to date.

Linking with a GitHub account

In order to setup a Trusted Build, you need to first link your Docker.io account with a GitHub one. This will allow the registry to see your repositories.

Note: We currently request access for read and write since Docker.io needs to setup a GitHub service hook. Although nothing else is done with your account, this is how GitHub manages permissions, sorry!

Creating a Trusted Build

You can create a Trusted Build from any of your public GitHub repositories with a Dockerfile.

Note: We currently only support public repositories. To have more than one Docker image from the same GitHub repository, you will need to set up one Trusted Build per Dockerfile, each using a different image name. This rule applies to building multiple branches on the same GitHub repository as well.

GitHub organizations

GitHub organizations appear once your membership to that organization is made public on GitHub. To verify, you can look at the members tab for your organization on GitHub.

GitHub service hooks

You can follow the below steps to configure the GitHub service hooks for your Trusted Build:

Step Screenshot Description
1. Login to Github.com, and visit your Repository page. Click on the repository "Settings" link. You will need admin rights to the repository in order to do this. So if you don't have admin rights, you will need to ask someone who does.
2. Service Hooks Click on the "Service Hooks" link
3.Find the service hook labeled DockerFind the service hook labeled "Docker" and click on it.
4.Activate Service Hooks Click on the "Active" checkbox and then the "Update settings" button, to save changes.

The Dockerfile and Trusted Builds

During the build process, we copy the contents of your Dockerfile. We also add it to the Docker.io for the Docker community to see on the repository page.

README.md

If you have a README.md file in your repository, we will use that as the repository's full description.

Warning: If you change the full description after a build, it will be rewritten the next time the Trusted Build has been built. To make changes, modify the README.md from the Git repository. We will look for a README.md in the same directory as your Dockerfile.

Build triggers

If you need another way to trigger your Trusted Builds outside of GitHub, you can setup a build trigger. When you turn on the build trigger for a Trusted Build, it will give you a URL to which you can send POST requests. This will trigger the Trusted Build process, which is similar to GitHub webhooks.

Note: You can only trigger one build at a time and no more than one every five minutes. If you have a build already pending, or if you already recently submitted a build request, those requests will be ignored. You can find the logs of last 10 triggers on the settings page to verify if everything is working correctly.

Repository links are a way to associate one Trusted Build with another. If one gets updated, linking system also triggers a build for the other Trusted Build. This makes it easy to keep your Trusted Builds up to date.

To add a link, go to the settings page of a Trusted Build and click on Repository Links. Then enter the name of the repository that you want have linked.

Warning: You can add more than one repository link, however, you should be very careful. Creating a two way relationship between Trusted Builds will cause a never ending build loop.