Skip to content

Latest commit

 

History

History
143 lines (132 loc) · 10.2 KB

deploy-container.mdx

File metadata and controls

143 lines (132 loc) · 10.2 KB
meta content tags dates categories
title description
How to deploy a container
Deploy containers from the Scaleway Container Registry or from external public registries.
h1 paragraph
How to deploy a container
Deploy containers from the Scaleway Container Registry or from external public registries.
deploy container create scaleway-registry docker image external registry public
validation posted
2025-02-25
2021-05-26
serverless
containers

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.

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. Available memory depends on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory.
  5. Set your autoscaling preferences:
    • Request concurrency: your container automatically scales up/down within the minimum and maximum values entered based on the number of concurrent requests received on each active instance of your container.
    • CPU percentage: your container automatically scales up/down within the minimum and maximum values entered based on the CPU load.
    • RAM percentage: your container automatically scales up/down within the minimum and maximum values entered based on the RAM used.
  6. In the Advanced options section, set the following:
    • Declare environment variables you want to inject into your container. For each environment variable, click +Add variable and enter the key/value pair.
    • Declare 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. Encode your environment variables and secrets to base64 if they are too large, and contain carriage returns.
    - Set the desired [privacy policy](/serverless-containers/concepts/#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](https://www.scaleway.com/en/developers/api/serverless-containers/#authentication) (**private**). - Tick the box under **HTTPS connections only** to prevent your container from being called from insecure HTTP connections. - Set a custom [timeout](/serverless-containers/concepts/#request-timeout) for the duration of the requests received by your container. - Tick the box under [HTTP protocol](/serverless-containers/concepts/#protocol) to listen to HTTP/2 requests if it is required by your application. Otherwise, we recommend you use HTTP/1. - Select a [sandbox](/serverless-containers/concepts/#sandbox) version: - Sandbox v2 for shorter cold starts (recommended). - Sandbox v1 if you require full compatibility with the Linux system call interface (legacy). - Update the [health check](/serverless-containers/concepts/#health-check) behavior according to your needs: - **Probe type**: TCP, or HTTP - **Health checks intervals**: 5s - 120s (default: 30s) - **Failure threshold**: 3 - 50 (default: 10) - Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs.
  7. Verify the estimated cost.
  8. 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.

  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:
    • 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. Available memory depends on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory.
  5. Set your autoscaling preferences:
    • Request concurrency: your container automatically scales up/down within the minimum and maximum values entered based on the number of concurrent requests received on each active instance of your container.
    • CPU percentage: your container automatically scales up/down within the minimum and maximum values entered based on the CPU load.
    • RAM percentage: your container automatically scales up/down within the minimum and maximum values entered based on the RAM used.
  6. In the Advanced options section, set the following:
    • Declare environment variables you want to inject into your container. For each environment variable, click +Add variable and enter the key/value pair.
    • Declare 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. Encode your environment variables and secrets to base64 if they are too large, and contain carriage returns.
    - Set the desired [privacy policy](/serverless-containers/concepts/#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](https://www.scaleway.com/en/developers/api/serverless-containers/#authentication) (**private**). - Tick the box under **HTTPS connections only** to prevent your container from being called from insecure HTTP connections. - Set a custom [timeout](/serverless-containers/concepts/#request-timeout) for the duration of the requests received by your container. - Tick the box under [HTTP protocol](/serverless-containers/concepts/#protocol) to listen to HTTP/2 requests if it is required by your application. Otherwise, we recommend you use HTTP/1. - Select a [sandbox](/serverless-containers/concepts/#sandbox) version: - Sandbox v2 for shorter cold starts (recommended). - Sandbox v1 if you require full compatibility with the Linux system call interface (legacy). - Update the [health check](/serverless-containers/concepts/#health-check) behavior according to your needs: - **Probe type**: TCP, or HTTP - **Health checks intervals**: 5s - 120s (default: 30s) - **Failure threshold**: 3 - 50 (default: 10) - Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs.
  7. Verify the estimated cost.
  8. Click Deploy container to finish.