forked from docker/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Introduce repo creation on push (docker#273)
Introduce repo creation on push
- Loading branch information
1 parent
a7bb1ea
commit 19fad1e
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: Allow users to create repositories when pushing | ||
description: By default Docker Trusted Registry only allows pushing images to | ||
existing repositories. Learn how to change that. | ||
keywords: dtr, repository | ||
ui_tabs: | ||
- version: dtr-2.5 | ||
orhigher: true | ||
cli_tabs: | ||
- version: cli | ||
--- | ||
|
||
{% if include.ui %} | ||
{% if include.version=="dtr-2.5" %} | ||
By default DTR only allows pushing images if the repository exists, and you | ||
have write access to the repository. | ||
|
||
As an example, if you try to push to `dtr.example.org/library/java:9`, and the | ||
`library/java` repository doesn't exist yet, your push fails. | ||
|
||
You can configure DTR to allow pushing to repositories that don't exist yet. | ||
As an administrator, log into the **DTR web UI**, navigate to the **Settings** | ||
page, and enable **Create repository on push**. | ||
|
||
![DTR settings page](images/create-on-push-1.png){: .with-border} | ||
|
||
From now on, when a user pushes to their personal sandbox | ||
(`<user-name>/<repository>`), or if the user is an administrator for the | ||
organization (`<org>/<repository>`), DTR will create a repository if it doesn't | ||
exist yet. In that case, the repository is created as private. | ||
{% endif %} | ||
{% endif %} | ||
|
||
|
||
{% if include.cli %} | ||
```bash | ||
curl --user <admin-user>:<password> \ | ||
--request POST "<dtr-url>/api/v0/meta/settings" \ | ||
--header "accept: application/json" \ | ||
--header "content-type: application/json" \ | ||
--data "{ \"createRepositoryOnPush\": true}" | ||
``` | ||
{% endif %} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.