Scaleway logo
Container Registry API

Container Registry API

Scaleway Container Registry is a fully-managed mutualised Container Registry, designed to facilitate the storage, management and deployment of container images. The service simplifies the development-to-production workflow, as there is no need to operate your own Container Registry or to worry about the underlying infrastructure.

Concepts

Refer to our dedicated concepts pageOpen in new context to find definitions of the different terms referring to Container Registry.

Quickstart

  1. Configure your environment variables.

    Note

    This is an optional step that seeks to simplify your usage of the APIs.

    TerminalCode
    export ACCESS_KEY="<access-key>" export SECRET_KEY="<secret-key>" export SCW_REGION="<region>"
  2. Edit the POST request payload you will use to create your Container Registry namespace. Replace the parameters in the following example:

    JSONCode
    '{ "name": "namespace1", "description": "this is my new namespace", "project_id": "d4c3139f-3010-4e5f-9e73-0f2df2d242f0", "is_public": "true" }'
    ParameterDescription
    nameREQUIRED Name of the namespace
    descriptionDescription of your namespace
    project_idREQUIRED The ID of the Project you want to create your namespace in. To find your Project ID you can list the projectsOpen in new context or consult the Scaleway consoleOpen in new context.
    is_publicBOOLEAN Whether or not the namespace is public.
  3. Create a namespace by running the following command. Make sure you include the payload you edited in the previous step. Replace

    TerminalCode
    curl -X POST \ -H "Content-Type: application/json" \ -H "X-Auth-Token: $SCW_SECRET_KEY" https://api.scaleway.com/registry/v1/regions/$SCW_REGION/namespaces \ -d '{ "name": "namespace1", "description": "this is my new namespace", "project_id": "d4c3139f-3010-4e5f-9e73-0f2df2d242f0", "is_public": true }'

    You should get a response like the following:

    JSONCode
    { "id": "99aa3f69-b194-41cf-aaca-3ef6d1012e1d", "name": "namespace1", "description": "this is my new namespace", "organization_id": "d4c3139f-3010-4e5f-9e73-0f2df2d242f0", "project_id": "d4c3139f-3010-4e5f-9e73-0f2df2d242f0", "status": "ready", "status_message": "", "endpoint": "rg.fr-par.scw.cloud/namespace1", "is_public": true, "size": 0, "created_at": "2023-04-04T13:33:46.965978759Z", "updated_at": "2023-04-04T13:33:46.965978759Z", "image_count": 0, "region": "string" }
  4. Log in to your new namespace the dockerOpen in new context CLI.

    Note

    Use the following hostname format when using the Docker CLI: . Replace with your . Keep in mind you can only have one registry namespace per region. In this example we use .

    TerminalCode
    docker login rg.fr-par.scw.cloud/namespace1 -u nologin -p ${SCW_SECRET_KEY}
  5. Pull the most recent image version of the tool you wish to use. In this example we use an nginxOpen in new context image.

    TerminalCode
    docker pull nginx:latest
  6. Tag the image.

    TerminalCode
    docker tag nginx:latest rg.fr-par.scw.cloud/namespace1/nginx:latest
  7. Push an image to your namespace.

    TerminalCode
    docker push rg.fr-par.scw.cloud/namespace1/nginx:latest

Requirement

To perform the following steps, you must first ensure that:

Technical Information

Regions

Scaleway's infrastructure is spread across different regions and Availability ZonesOpen in new context.

Container Registry is available in the Paris, Amsterdam and Warsaw regions, which are represented by the following path parameters:

  • fr-par
  • nl-ams
  • pl-waw

Going Further

For more information about Container Registry, you can check out the following pages:

Tags