mirror of https://github.com/docker/docs.git
Merge pull request #10903 from programmerq/docs_submodules
Update docs around private github submodules in automated builds.
This commit is contained in:
commit
cce196d64b
|
@ -63,13 +63,15 @@ public or private GitHub repositories with a `Dockerfile`.
|
||||||
|
|
||||||
### GitHub Submodules
|
### GitHub Submodules
|
||||||
|
|
||||||
If your GitHub repository contains links to private submodules, you'll
|
If your GitHub repository contains links to private submodules, you'll get an
|
||||||
need to add a deploy key from your Docker Hub repository.
|
error message in your build.
|
||||||
|
|
||||||
Your Docker Hub deploy key is located under the "Build Details"
|
Normally, the Docker Hub sets up a deploy key in your GitHub repository.
|
||||||
menu on the Automated Build's main page in the Hub. Add this key
|
Unfortunately, GitHub only allows a repository deploy key to access a single repository.
|
||||||
to your GitHub submodule by visiting the Settings page for the
|
|
||||||
repository on GitHub and selecting "Deploy keys".
|
To work around this, you need to create a dedicated user account in GitHub and attach
|
||||||
|
the automated build's deploy key that account. This dedicated build account
|
||||||
|
can be limited to read-only access to just the repositories required to build.
|
||||||
|
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -82,15 +84,33 @@ repository on GitHub and selecting "Deploy keys".
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>1.</td>
|
<td>1.</td>
|
||||||
|
<td><img src="/docker-hub/hub-images/gh_org_members.png"></td>
|
||||||
|
<td>First, create the new account in GitHub. It should be given read-only
|
||||||
|
access to the main repository and all submodules that are needed.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>2.</td>
|
||||||
|
<td><img src="/docker-hub/hub-images/gh_team_members.png"></td>
|
||||||
|
<td>This can be accomplished by adding the account to a read-only team in
|
||||||
|
the organization(s) where the main GitHub repository and all submodule
|
||||||
|
repositories are kept.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>3.</td>
|
||||||
|
<td><img src="/docker-hub/hub-images/gh_repo_deploy_key.png"></td>
|
||||||
|
<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>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>4.</td>
|
||||||
<td><img src="/docker-hub/hub-images/deploy_key.png"></td>
|
<td><img src="/docker-hub/hub-images/deploy_key.png"></td>
|
||||||
<td>Your automated build's deploy key is in the "Build Details" menu
|
<td>Your automated build's deploy key is in the "Build Details" menu
|
||||||
under "Deploy keys".</td>
|
under "Deploy keys".</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>2.</td>
|
<td>5.</td>
|
||||||
<td><img src="/docker-hub/hub-images/github_deploy_key.png"></td>
|
<td><img src="/docker-hub/hub-images/gh_add_ssh_user_key.png"></td>
|
||||||
<td>In your GitHub submodule's repository Settings page, add the
|
<td>In your dedicated GitHub User account, add the deploy key from your
|
||||||
deploy key from your Docker Hub Automated Build.</td>
|
Docker Hub Automated Build.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
Before Width: | Height: | Size: 20 KiB |
Loading…
Reference in New Issue