Base images are composed of an operating system stack and language runtime:
- A stack is made up of a Linux distribution version
and system packages, such as OpenSSL and
curl
. - A language runtime is the specific version of the programming language used by your application.
Cloud Run supports multiple language runtimes, each of which is available through container base images provided by Google Cloud's buildpacks. Language runtimes are supported only as long as they are supported by their respective open source communities.
It is the developer's responsibility to upgrade services to newer language runtimes before it reaches end of support. Refer to the Cloud Run runtime lifecycle for details.
The Cloud Run lifecycle policy does not apply to containers built outside of Cloud Run.
Using language runtimes
Cloud Run language runtimes are used for the following:
- Deploying functions
- Enabling automatic security updates
- As base images for building containers
Security and maintenance updates
Security and maintenance updates are available for generally available language runtimes. You can apply these updates automatically or manually depending on how you configure automatic security updates. Automatic security updates are enabled by default when deploying functions to Cloud Run.
How to obtain base images
Base images are hosted in every region where Artifact Registry is available.
There are three methods for specifying a base image:
RUNTIME_ID
: will give you the base image for the specified language using its default stack. The base image will be taken from a repository in the sameREGION
where your service is deployed. We recommend you specify theRUNTIME_ID
for most cases.STACK/RUNTIME_ID
: an alias for the full base image path. The base image will be taken from a repository in the sameREGION
where your service is deployed. Use this option if you need a specific system package in the stack.REGION-docker.pkg.dev/serverless-runtimes/STACK/runtimes/RUNTIME_ID
: the full base image path. Use this option if you want full control over the specific base image and the region where its downloaded from.
For the three methods for specifying a base image, replace:
- REGION with the preferred region, for example
us-central1
- STACK with the preferred operating system stack,
for example
google-22-full
- RUNTIME_ID with the language runtime ID used by your function, for
example
python310
For example, to reference the full base image path for the latest Node.js 20
base image using the google-22-full
stack, hosted in us-central1
, use the
following URL:
us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22
Node.js
Runtime | Runtime ID | Stacks | Runtime base image |
---|---|---|---|
Node.js 22 | nodejs22 |
|
|
Node.js 20 | nodejs20 |
|
|
Node.js 18 | nodejs18 |
|
|
Node.js 16 | nodejs16 | google-18-full | google-18-full/nodjes16 |
Node.js 14 | nodejs14 | google-18-full | google-18-full/nodjes14 |
Node.js 12 | nodejs12 | google-18-full | google-18-full/nodjes14 |
Node.js 10 | nodejs10 | google-18-full | google-18-full/nodjes10 |
Node.js 8 | nodejs8 | Decommissioned | Decommissioned |
Node.js 6 | nodejs6 | Decommissioned | Decommissioned |
Python
Runtime | Runtime ID | Stacks | Runtime base image |
---|---|---|---|
Python 3.12 | python312 |
|
|
Python 3.11 | python311 |
|
|
Python 3.10 | python310 |
|
|
Python 3.9 | python39 | google-18-full | google-18-full/python39 |
Python 3.8 | python38 | google-18-full | google-18-full/python38 |
Python 3.7 | python37 | google-18-full | google-18-full/python37 |
Go
Runtime | Runtime ID | Stacks | Runtime base image |
---|---|---|---|
Go 1.23 (Preview only) |
go123 |
|
|
Go 1.22 | go122 |
|
|
Go 1.21 | go121 |
|
|
Go 1.20 | go120 |
|
|
Go 1.19 | go119 |
|
|
Go 1.18 | go118 |
|
|
Go 1.16 | go116 | google-18-full | google-18-full/go116 |
Go 1.13 | go113 | google-18-full | google-18-full/go113 |
Go 1.11 | go111 | Decommissioned | Decommissioned |
Java
Runtime | Runtime ID | Stacks | Runtime base image |
---|---|---|---|
Java 21 | java21 |
|
|
Java 17 | java17 |
|
|
Java 11 | java11 | google-18 | google-18/java11 |
Ruby
Runtime | Runtime ID | Stacks | Runtime base image |
---|---|---|---|
Ruby 3.3 | ruby33 |
|
|
Ruby 3.2 | ruby32 |
|
|
Ruby 3.0 | ruby30 | google-18-full | google-18-full/ruby30 |
Ruby 2.7 | ruby27 | google-18-full | google-18-full/ruby27 |
Ruby 2.6 | ruby26 | google-18-full | google-18-full/ruby26 |
PHP
Runtime | Runtime ID | Stacks | Runtime base image |
---|---|---|---|
PHP 8.3 | php83 |
|
|
PHP 8.2 | php82 |
|
|
PHP 8.1 | php81 | google-18-full | google-18-full/php81 |
PHP 7.4 | php74 | google-18-full | google-18-full/php74 |
.NET Core
Runtime | Runtime ID | Stacks | Runtime base image |
---|---|---|---|
.NET Core 8 | dotnet8 |
|
|
.NET Core 6 | dotnet6 |
|
|
.NET Core 3 | dotnet3 | google-18-full | google-18-full/dotnet3 |