RCS Container Registry Print

  • 0

Header Image

Introduction

RCS Container Registry is a cloud-based solution designed to manage and store container images for applications. It simplifies the process of handling containerized applications by providing a secure and accessible repository. With RCS Container Registry, you can easily store, distribute, and collaborate on container images, making it a valuable tool for modern software development and deployment.

How to Create a New Registry

A registry serves as a comprehensive catalog of available software containers, while a repository functions like a library, housing specific software containers and their various versions. Users can utilize the catalog to discover and access containers stored within repositories.

  1. Choose the Container Registry menu item on the Products page

    registry-button

  2. Click Add Container Registry

    new-container

  3. Choose a name for the Registry, for example: testregistry1

    • The name should be in lowercase alphanumeric characters

    • The name should be globally unique within the RCS Container Registry.

  4. Select the location

  5. Choose a plan

  6. Optional: If you want your repository to be publically accessible, click Public checkbox under the Visibility section to make the registry publically accessible. By default, the Registry is set to private visibility only accessible to authorized users

  7. Click Add Container Registry

    add-registry

How to Manage the Container Registry

  1. To retrieve the credentials for accessing the Registry click Manage Container Registry.

    manage-registry

  2. Log in your registry

    $ docker login https://sjc.RCScr.com/testregistry1 -u USER_NAME -p PASSWORD
    

    Make sure to replace USER_NAME and PASSWORD with the actual values provided in the overview section of the registry.

  3. In your machine run the following command

    $ docker pull hello-world:latest
    

    The above command pulls a lightweight hello-world container image from Docker Hub

  4. Change the source image tag and registry

    $ docker tag hello-world:latest sjc.RCScr.com/testregistry1/hello-world:latest
    

    The above command creates a new tag for the image you downloaded from the Docker Hub, it changes the registry to sjc.RCScr.com and the repository to testregistry1

  5. Confirm the change

    $ docker image list
    

    Output

    REPOSITORY                                    TAG       IMAGE ID       CREATED        SIZE
    
    sjc.RCScr.com/testregistry1/hello-world     latest    9c7a54a9a43c   4 months ago   13.3kB
    
    hello-world                                   latest    9c7a54a9a43c   4 months ago   13.3kB
    

    In the above output, two container images are listed which means that you can now push the hello-world image to the registry you made on the RCS Dashboard.

  6. Push the container image to the RCS Container Registry

    $ docker push sjc.RCScr.com/testregistry1/hello-world:latest
    

    The above command pushes the hello world image to the testregistry1 container registry you created earlier.

    Output

    The push refers to repository [sjc.RCScr.com/testregistery1/hello-world]
    
    9c7a54a9a43c: Pushed 
    
    latest: digest: sha256:7e9b6e7ba2842c91cf49f3e214d04a7a496f8214356f41d81a6e6dcad11f11e3 size: 525
    
  7. Confirm the change on RCS Dashboard, click Repositories

    repository-button

    In the image given below, a new repository is present with the name testregistry1/hello-world

    new-repository

Pulling Images from Public/Private Registries

RCS offers the option to make both public and private registries, depending on the type of registry you have created the method to pull an image from a public registry varies from pulling an image from a private registry.

  1. Login if the registry you are pulling from is private

    $ docker login https://sjc.RCScr.com/testregistry1 -u USER_NAME -p PASSWORD
    
  2. Pull an image from the registry

    $ docker pull sjc.RCScr.com/testregistry1/hello-world:latest
    

    Output

    latest: Pulling from testregistry1/hello-world
    
    9c7a54a9a43c: Pull complete 
    
    Digest: sha256:7e9b6e7ba2842c91cf49f3e214d04a7a496f8214356f41d81a6e6dcad11f11e3
    
    Status: Downloaded newer image for sjc.RCScr.com/testregistry1/hello-world:latest
    
    sjc.RCScr.com/testregistry1/hello-world:latest
    

    It is necessary to log in to access a private registry otherwise you will encounter the below error.

    Error response from daemon: unauthorized: unauthorized to access repository: testregistry1/hello-world, action: pull: unauthorized to access repository: testregistry1/hello-world, action: pull
    

    The command to pull an image from a public repository is the same as given in step 2 of this subsection.

Manage Container Registry via the API

The RCS API offers several endpoints to manage container registries.

List All Container Registries

  • Get a list of all container registries in your account.

Manage a Container Registry

  • Create a new container registry.

  • Get information about a container registry.

  • Update information for a container registry.

  • Delete a container registry.

List All Repositories

  • Get a list of all repositories inside a container registry.

Manage a Repository

  • Get information about a repository.

  • Update information for a repository.

  • Delete a repository.

Additional Endpoints

  • Create Docker credentials.

  • Create Docker credentials for Kubernetes.

  • List container registry regions.

  • List container registry plans.

Frequently Asked Questions

Can I use RCS Container Registry as an alternative to DockerHub?

Yes, you can use RCS Container Registry as an alternative to DockerHub or other container registries such as Github Container Registry, Amazon Elastic Container Registry and so on.

Can I use RCS Container Registry with Kubernetes?

Yes, you can host your container images and use them in your Kubernetes cluster.

How many free RCS Container Registry subscriptions are allowed?

Only 1 free registry is allowed per account.

Can I change the visibility type once the registry has been created?

Yes, you can change the visibility of a public registry to private or vice-versa in the settings menu of the registry dashboard.

Can I change the size after registry is created?

Yes, you can upgrade or downgrade the plan from the settings menu of the registry dashboard.

What is the default visility type of a registry?

All the registries are set to private by default.


Was this answer helpful?
Back

Powered by WHMCompleteSolution