NavigationContentFooter
Jump toSuggest an edit

How to deploy a container

Reviewed on 05 November 2024Published on 26 May 2021

This page shows you how to deploy Serverless Containers using the Scaleway console.

You can deploy a container from the Scaleway Container Registry, or any other public container registry, such as Docker Hub, AWS Container registries, GitLab container registry, etc.

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
  • Created a containers namespace
  • Created a Container Registry namespace and pushed a container image to it

Deploy from the Scaleway Container Registry

  1. Click Containers in the Serverless section of the side menu. The containers page displays.
  2. Click the relevant container’s namespace.
  3. Click Deploy container. The container creation wizard displays.
  4. Complete the following steps in the wizard:
    • Select the Scaleway Container Registry.
    • Choose an image from your Container Registry.
    • Select the required Container Registry namespace from the drop-down list, and then select the container and tag.
    • Choose the port your container is listening on. We recommend configuring your container to listen on the $PORT environment variable.
    • Choose a name for your container and, optionally, a description. The name must only contain alphanumeric characters and dashes.
    • Choose the resources to be allocated to your container at runtime. These define the performance characteristics of your container.
      Note

      Available memory depends on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory.

    • Set your scaling preferences, or leave them at default values. The Scaleway platform automatically scales the number of available instances of your container to match the incoming load, depending on the settings you define here.
    • Click Advanced options to define any environment variables you want to inject into your container. For each environment variable, click +Add variable and enter the key/value pair.
    • Add secrets for your container. Secrets are environment variables that are injected into your container, but the values are not retained or displayed by Scaleway after initial validation.
      Note

      Encode your environment variables and secrets to base64 if they are too large, and contain carriage returns.

    • Set the desired privacy policy for your container. This defines whether container invocation may be done anonymously (public) or only via an authentication mechanism provided by the Scaleway API (private).
    • Set a custom timeout for your container.
    • Verify the estimated cost.
  5. Click Deploy container to finish.

Deploy from an external container registry

Scaleway Serverless Containers allows you to deploy containers from external public container registries, such as Docker Hub, AWS container registries, GitLab container registry, etc.

Private external container registries are currently not supported.

Important

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.

  1. Click Containers in the Serverless section of the side menu. The containers page displays.
  2. Click the relevant container’s namespace.
  3. Click Deploy container. The container creation wizard displays.
  4. Complete the following steps in the wizard:
    • Select the External container registry.
    • Enter the public container image URL provided by the external registry. For example:
      • nginx:latest to deploy the latest nginx image from Docker Hub
      • ghcr.io/namespace/image to deploy an image from GitHub Container Registry
    • Choose the port your container is listening on. We recommend configuring your container to listen on the $PORT environment variable.
    • Choose a name for your container and, optionally, a description. The name must only contain alphanumeric characters and dashes.
    • Choose the resources to be allocated to your container at runtime. These define the performance characteristics of your container.
      Note

      Available memory depends on allocated vCPU, and maximum ephemeral storage value depends on allocated memory.

    • Set your scaling preferences, or leave them at default values. The Scaleway platform automatically scales the number of available instances of your container to match the incoming load, depending on the settings you define here.
    • Click Advanced options to define any environment variables you want to inject into your container. For each environment variable, click +Add variable and enter the key/value pair.
    • Add secrets for your container. Secrets are environment variables that are injected into your container, but the values are not retained or displayed by Scaleway after initial validation.
      Note

      Encode your environment variables and secrets to base64 if they are too large, and contain carriage returns.

    • Set the desired privacy policy for your container. This defines whether container invocation may be done anonymously (public) or only via an authentication mechanism provided by the Scaleway API (private).
    • Set a custom timeout for your container.
    • Verify the estimated cost.
  5. Click Deploy container to finish.
See also
How to manage a Containers namespaceHow to manage a container
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway