diff --git a/menu/navigation.json b/menu/navigation.json index b0e4370536..e452e32920 100644 --- a/menu/navigation.json +++ b/menu/navigation.json @@ -3856,6 +3856,10 @@ { "label": "Create and deploy a container with the Scaleway CLI", "slug": "deploy-container-cli" + }, + { + "label": "Migrate images to the Scaleway Registry", + "slug": "migrate-external-image-to-scaleway-registry" } ], "label": "API/CLI", @@ -3980,6 +3984,10 @@ { "label": "Jobs API Reference", "slug": "https://www.scaleway.com/en/developers/api/serverless-jobs/" + }, + { + "label": "Migrate images to the Scaleway Registry", + "slug": "migrate-external-image-to-scaleway-registry" } ], "label": "API/CLI", diff --git a/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx b/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx new file mode 100644 index 0000000000..cd60fb4fd0 --- /dev/null +++ b/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx @@ -0,0 +1,64 @@ +--- +meta: + title: Migrating an external image to the Scaleway Container Registry + description: Methods to migrate or import an image from an external public container registry to the Scaleway Container Registry. +content: + h1: Migrating an external image to the Scaleway Container Registry + paragraph: Methods to migrate or import an image from an external public container registry to the Scaleway Container Registry. +tags: serverless containers registry import copy migrate skopeo docker +dates: + validation: 2024-11-06 + posted: 2021-11-06 +categories: + - serverless +--- + +Serverless Containers rely on images that can be stored in the Scaleway Container Registry, or in external public registries. + + + +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](/containers/container-registry/#container-registry). + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) +- Created a [Container Registry namespace](/containers/container-registry/how-to/create-namespace/) + +## Import images using Docker + +1. Install the Docker Engine by following the [official documentation](https://docs.docker.com/engine/install/). + +2. Login to your Scaleway Container Registry namespace with the Docker CLI by following [this procedure](/containers/container-registry/how-to/connect-docker-cli/). + +3. 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:latest + docker tag alpine:latest rg.fr-par.scw.cloud/my-namespace/alpine:latest + docker push rg.fr-par.scw.cloud/my-namespace/alpine:latest + ``` + +4. Your image now appears in the [Container Registry section](https://console.scaleway.com/registry/namespaces) of the Scaleway console, in the namespace specified above. + +## Import images using Skopeo + +[Skopeo](https://github.com/containers/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. + +1. Install Skopeo by referring to the [official documentation](https://github.com/containers/skopeo/blob/main/install.md). + +2. 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 + ``` + +3. 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 + ``` + +4. Your image now appears in the [Container Registry section](https://console.scaleway.com/registry/namespaces) of the Scaleway console, in the namespace specified above. \ No newline at end of file diff --git a/serverless/jobs/api-cli/index.mdx b/serverless/jobs/api-cli/index.mdx new file mode 100644 index 0000000000..0dc26eb32a --- /dev/null +++ b/serverless/jobs/api-cli/index.mdx @@ -0,0 +1,9 @@ +--- +meta: + title: Serverless Jobs - API/CLI Documentation + description: API and CLI reference for Scaleway Serverless Jobs. +content: + h1: Serverless Jobs API/CLI Documentation + paragraph: API and CLI reference for Scaleway Serverless Jobs. +--- + diff --git a/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx b/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx new file mode 100644 index 0000000000..0b11deb74f --- /dev/null +++ b/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx @@ -0,0 +1,64 @@ +--- +meta: + title: Migrating an external image to the Scaleway Container Registry + description: Methods to migrate or import an image from an external public container registry to the Scaleway Container Registry. +content: + h1: Migrating an external image to the Scaleway Container Registry + paragraph: Methods to migrate or import an image from an external public container registry to the Scaleway Container Registry. +tags: serverless jobs registry import copy migrate skopeo docker +dates: + validation: 2024-11-06 + posted: 2021-11-06 +categories: + - serverless +--- + +Serverless Jobs rely on container images. These images can be stored in the Scaleway Container Registry, or in external public registries. + + + +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](/containers/container-registry/#container-registry). + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) +- Created a [Container Registry namespace](/containers/container-registry/how-to/create-namespace/) + +## Import images using Docker + +1. Install the Docker Engine by following the [official documentation](https://docs.docker.com/engine/install/). + +2. Login to your Scaleway Container Registry namespace with the Docker CLI by following [this procedure](/containers/container-registry/how-to/connect-docker-cli/). + +3. 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:latest + docker tag alpine:latest rg.fr-par.scw.cloud/my-namespace/alpine:latest + docker push rg.fr-par.scw.cloud/my-namespace/alpine:latest + ``` + +4. Your image now appears in the [Container Registry section](https://console.scaleway.com/registry/namespaces) of the Scaleway console, in the namespace specified above. + +## Import images using Skopeo + +[Skopeo](https://github.com/containers/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. + +1. Install Skopeo by referring to the [official documentation](https://github.com/containers/skopeo/blob/main/install.md). + +2. 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 + ``` + +3. 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 + ``` + +4. Your image now appears in the [Container Registry section](https://console.scaleway.com/registry/namespaces) of the Scaleway console, in the namespace specified above. \ No newline at end of file