Containers - Quickstart
A container is a package of software that includes all dependencies: code, runtime, configuration, and system libraries so that the software can run on any host system. The Scaleway Containers platform provides you with containerized stateless applications deployed in the cloud. You can use your favorite technologies such as Django or Ruby on Rails for your containers. We show you how to create a containers namespace, deploy a container, and delete it when you are done.
This page explains how to deploy containers using the Scaleway console. For advanced usage, such as larger projects with dependencies, automation, multiple containers, and more, there are several ways to deploy containers. Check out our scaleway/serverless-examples repository for real-world examples.
You may need certain IAM permissions to carry out some actions described on this page. This means:
- you are the Owner of the Scaleway Organization in which the actions will be carried out, or
- you are an IAM user of the Organization, with a policy granting you the necessary permission sets
- You have an account and are logged into the Scaleway console
How to create a Serverless Containers namespace
-
Click Containers in the Serverless section of the side menu. The containers page displays.
-
Click Create namespace. The containers namespace creation wizard displays.
-
Complete the following steps in the wizard:
- Enter a name and optionally a description for your namespace. The name must only contain alphanumeric characters.
- Choose a region, which is the geographical location in which your namespace will be deployed.
- Enter any environment variables required for your namespace. Environment variables configured in a namespace will be available in all containers/apps within the same namespace. For each environment variable, click +Add new variable and enter the key/value pair.
- Add secrets for your container. Secrets are environment variables which are injected into your container, but the values are not retained or displayed by Scaleway after initial validation.
- Verify the estimated cost.
-
Click Create namespace to finish.
Your namespace is now created, and you are taken to its Containers tab.
How to deploy a container
You can deploy a container either from the Scaleway Container Registry or any other public container registry (Docker Hub, AWS Container registries, GitLab container registry, etc.).
Deploy from the Scaleway Container Registry
- Click Containers in the Serverless section of the side menu. The containers page displays.
- Click the relevant container’s namespace.
- Click Deploy container. The container creation wizard displays.
- 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.
- Set your scaling preferences, or leave them at default values. The Scaleway platform autoscales the number of available instances of your container to match the incoming load, depending on the settings you define here.
- Define any environment variables you want to inject into your container. For each environment variable, click +Add new variable and enter the key/value pair.
- Add secrets for your container. Secrets are environment variables which are injected into your container, but the values are not retained or displayed by Scaleway after initial validation.
- 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).
- Click Advanced Options if you wish to set a custom timeout for your container.
- Verify the estimated cost.
- Click Deploy container to finish.
Deploy from an external registry
- Click Containers in the Serverless section of the side menu. The containers page displays.
- Click the relevant container’s namespace.
- Click Deploy container. The container creation wizard displays.
- Complete the following steps in the wizard:
- Select the External container registry.
- Enter the public container image URL provided by the external 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.
- Set your scaling preferences, or leave them at default values. The Scaleway platform autoscales the number of available instances of your container to match the incoming load, depending on the settings you define here.
- Define any environment variables you want to inject into your container. For each environment variable, click +Add new variable and enter the key/value pair.
- Add secrets for your container. Secrets are environment variables which are injected into your container, but the values are not retained or displayed by Scaleway after initial validation.
- 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).
- Click Advanced Options if you wish to set a custom timeout for your container.
- Verify the estimated cost.
- Click Deploy container to finish.
How to delete a container
- Click Containers in the Serverless section of the side menu. The containers page displays.
- Click the relevant container’s namespace.
- Click the «See more Icon» icon next to the container you want to delete, and select Delete from the drop-down menu.
- Type DELETE in the pop-up that asks you to confirm the action, then click Delete container.
Tip:
You can also delete a container from the container settings tab.