Migrating an external image to the Scaleway Container Registry
Serverless Containers rely on images that can be stored in the Scaleway Container Registry, or in external public registries.
Scaleway's Container Registry allows for a seamless integration with Serverless Containers and Jobs at a competitive price. Serverless products support external public registries (such as Docker Hub), but we do not recommend using them due to uncontrolled rate limiting, which can lead to failures when starting resources, unexpected usage conditions, and pricing changes.
This page explains how to migrate images from public external container registries (such as Docker hub, Amazon container registries, GitHub Container registry, etc.) to the Scaleway Container registry.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- A valid API key
- Created a Container Registry namespace
Import images using Docker
-
Install the Docker Engine by following the official documentation.
-
Login to your Scaleway Container Registry namespace with the Docker CLI by following this procedure.
-
Run the command below to pull, tag, then push the public image to your Scaleway Registry namespace. Make sure to replace the namespace name, and the image name by the appropriate values:
docker pull alpine:latestdocker tag alpine:latest rg.fr-par.scw.cloud/my-namespace/alpine:latestdocker push rg.fr-par.scw.cloud/my-namespace/alpine:latest -
Your image now appears in the Container Registry section of the Scaleway console, in the namespace specified above.
Import images using Skopeo
Skopeo is a command line utility that allows you to perform various operations on container images and registries, such as image copy, inspection, deletion, etc.
-
Install Skopeo by referring to the official documentation.
-
Run the command below to log in to the Scaleway Container Registry. Make sure to specify the desired region:
skopeo login rg.fr-par.scw.cloud -u nologin -p $SCW_SECRET_KEY -
Run the command below to copy an image from an external registry to the Scaleway Registry. Make sure to replace the registry, namespace and image names by the appropriate values:
skopeo copy --override-os \linux docker://docker.io/alpine:latest \docker://rg.fr-par.scw.cloud/my-namespace/alpine:latest -
Your image now appears in the Container Registry section of the Scaleway console, in the namespace specified above.