Oracle Cloud Infrastructure Documentation

Creating a Repository

Using the Console, you can create an empty repository in Oracle Cloud Infrastructure Registry and give it a name. Any images you subsequently push to the registry that include the repository in the image name are grouped into that repository.

Having created the new repository, you can push an image to the repository using the Docker CLI (see Pushing Images Using the Docker CLI).

Note that although creating an empty repository in advance can be a convenient placeholder, it is not strictly necessary. When you push an image, you use a command in the format docker push <region-code>.ocir.io/<tenancy-namespace>/<repo-name>/<image-name>:<tag>. However:

  • If you push an image and the command includes the name of a repository that doesn't already exist, a new private repository is created automatically. For example, if you enter a command like docker push iad.ocir.io/ansh81vru1zp/project02/acme-web-app:7.5.2 and the project02 repository doesn't exist, a private repository called project02 is created automatically.
  • If you push an image and the command doesn't include a repository name, the image's name is used as the name of the repository. For example, if you enter a command like docker push iad.ocir.io/ansh81vru1zp/acme-web-app:7.5.2 that doesn't contain a repository name, the image's name (acme-web-app) is used as the name of a private repository.

Using the Console

To create a repository in Oracle Cloud Infrastructure Registry:

  1. In the Console, open the navigation menu. Under Solutions and Platform, go to Developer Services and click Registry.
  2. Choose the region in which to create the repository.
  3. Click Create Repository.
  4. In the Add Repository dialog box, specify details for the new repository:

    • Repository Name: A name of your choice for the new repository. Avoid entering confidential information.
    • Public: Whether the new repository will be a public repository or a private repository. You can only make the new repository public if you belong to the tenancy's Administrators group or have been granted the REPOSITORY_MANAGE permission. If you make the new repository public, any user with internet access and knowledge of the appropriate URL will be able to pull images from the repository. If you make the repository private, you (along with users belonging to the tenancy's Administrators group) will be able to perform any operation on the repository.
  5. Click Submit.