Create a repositoryEstimated reading time: 2 minutes
This topic applies to Docker Enterprise.
The Docker Enterprise platform business, including products, customers, and employees, has been acquired by Mirantis, inc., effective 13-November-2019. For more information on the acquisition and how it may affect you and your business, refer to the Docker Enterprise Customer FAQ.
Since DTR is secure by default, you need to create the image repository before being able to push the image to DTR.
In this example, we’ll create the
wordpress repository in DTR.
Create a repository
To create an image repository for the first time, log in to
https://<dtr-urlwith your UCP credentials.
Select Repositories from the left navigation pane and click New repository on the upper right corner of the Repositories page.
Select your namespace and enter a name for your repository (upper case letters and some special characters not accepted). You can optionally add a description.
Choose whether your repository is
- Public repositories are visible to all users, but can only be changed by users with write permissions to them.
- Private repositories can only be seen by users that have been granted permissions to that repository.
Click Create to create the repository.
When creating a repository in DTR, the full name of the repository becomes
<dtr-domain-name>/<user-or-org>/<repository-name>. In this example, the full name of our repository will be
Optional: Click Show advanced settings to make your tags immutable or set your image scanning trigger.
Immutable tags and tag limit
Starting in DTR 2.6, repository admins can enable tag pruning by setting a tag limit. This can only be set if you turn off Immutability and allow your repository tags to be overwritten.
Image name size for DTR
When creating an image name for use with DTR ensure that the organization and repository name has less than 56 characters and that the entire image name which includes domain, organization and repository name does not exceed 255 characters.
<user-or-org/repository-name>limit in DTR is due to an underlying limitation in how the image name information is stored within DTR metadata in RethinkDB. RethinkDB currently has a Primary Key length limit of 127 characters.
When DTR stores the above data it appends a sha256sum comprised of 72 characters to the end of the value to ensure uniqueness within the database. If the
<user-or-org/repository-name>exceeds 56 characters it will then exceed the 127 character limit in RethinkDB (72+56=128).
While you can enable just-in-time creation of multi-archictecture image repositories when creating a repository via the API, Docker does not recommend using this option. This breaks content trust and causes other issues. To manage Docker image manifests and manifest lists, use the experimental CLI command, docker manifest, instead.