Skip to content

Commit ce5d4a1

Browse files
feat(srvless): image size tips
1 parent 89ccd60 commit ce5d4a1

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

pages/serverless-containers/reference-content/containers-limitations.mdx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ This section contains usage limits that apply when using Serverless Containers.
2222
| Containers | Max number | 1000* | Organization |
2323
| Total container memory\** | Max size | 600 GiB | Organization |
2424
| Custom domains | Max number | 50 | Container |
25-
| Image size compressed | Max size | 250 MiB | Container |
26-
| Image size uncompressed | Max size | 1 GiB | Container |
27-
| Temporary disk size | Max size | 1024 MiB | Container |
25+
| Recommended maximum uncompressed image size | Max size | 1 GB | Container |
26+
| Temporary disk size ¨ | Max size | 24 000 MiB | Container |
2827
| Invocation rate | Max number | 1000 per second | Container |
2928
| Concurrency | Max | 80 | Container Instance |
3029
| Max Scale (simultaneous Container instances) | Max | 50 | Container |
@@ -49,6 +48,17 @@ These limits are enforced as [Organization quotas](/organizations-and-projects/a
4948

5049
During the execution of the container, if the limits are exceeded, a restart occurs.
5150

51+
## Image size
52+
53+
We recommend to keep your image size **below 1GB** to ensure faster deployment and better cold start performances.
54+
55+
### Tips for keeping image size down
56+
57+
* Use lightweight distribution like *Alpine*
58+
* Minimize layers and unnecessary dependencies
59+
* Clean up temp files and cache (e.g., `rm -rf /var/lib/apt/lists/*` in Debian-based images)
60+
* Use multi-stage builds to keep only runtime essentials. [Example](https://github.com/scaleway/serverless-examples/blob/a7a3b5fc3427ec0f1391aaa78957f91af266867c/containers/rust-hello-world/Dockerfile#L14)
61+
5262
## Configuration Restrictions
5363

5464
In order to ensure the proper functioning of the product, we restrict the use of certain ports and environment variables

pages/serverless-jobs/reference-content/jobs-limitations.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,14 @@ In order to ensure the proper functioning of the product, we restrict the use of
6262
## Private Network and Virtual Private Cloud (VPC) compatibility
6363

6464
Refer to the [dedicated FAQ](/serverless-jobs/faq/#how-can-i-configure-access-to-a-private-network-or-virtual-private-cloud-vpc) for more information on Serverless Jobs compatibility with Private Networks and [Virtual Private Cloud (VPC)](/vpc/).
65+
66+
## Image size
67+
68+
We recommend to keep your image size **below 2GB** to ensure faster deployment.
69+
70+
### Tips for keeping image size down
71+
72+
* Use lightweight distribution like *Alpine*
73+
* Minimize layers and unnecessary dependencies
74+
* Clean up temp files and cache (e.g., `rm -rf /var/lib/apt/lists/*` in Debian-based images)
75+
* Use multi-stage builds to keep only runtime essentials. [Example](https://github.com/scaleway/serverless-examples/blob/a7a3b5fc3427ec0f1391aaa78957f91af266867c/containers/rust-hello-world/Dockerfile#L14)

0 commit comments

Comments
 (0)