Runtime bahasa dan image dasar yang didukung

Halaman ini menjelaskan runtime bahasa dan image dasar yang didukung untuk men-deploy layanan atau fungsi dari sumber, dan image container yang dibuat dari awal.

Image dasar terdiri dari stack sistem operasi dan runtime bahasa:

  • Stack terdiri dari versi distribusi Linux dan paket sistem, seperti OpenSSL dan curl.
  • Runtime bahasa adalah versi spesifik bahasa pemrograman yang digunakan oleh aplikasi Anda.

Cloud Run mendukung beberapa runtime bahasa, yang masing-masing tersedia melalui image dasar container yang disediakan oleh buildpack Google Cloud. Runtime bahasa hanya didukung selama didukung oleh komunitas open source masing-masing.

Developer bertanggung jawab untuk mengupgrade layanan ke runtime bahasa yang lebih baru sebelum mencapai akhir dukungan. Lihat siklus proses runtime Cloud Run untuk mengetahui detailnya.

Kebijakan siklus proses Cloud Run tidak berlaku untuk container yang dibangun di luar Cloud Run.

Menggunakan runtime bahasa

Runtime bahasa Cloud Run digunakan untuk hal berikut:

Update keamanan dan pemeliharaan

Update keamanan dan pemeliharaan tersedia untuk runtime bahasa yang tersedia secara umum. Anda dapat menerapkan update ini secara otomatis atau manual, bergantung pada cara Anda mengonfigurasi update keamanan otomatis. Update keamanan otomatis diaktifkan secara default saat men-deploy fungsi dan layanan ke Cloud Run.

Cara mendapatkan gambar dasar

Image dasar dihosting di setiap region tempat Artifact Registry tersedia.

Ada tiga metode untuk menentukan gambar dasar:

  • RUNTIME_ID: Memberi Anda gambar dasar untuk bahasa yang ditentukan menggunakan stack defaultnya. Image dasar akan diambil dari repositori di REGION yang sama dengan tempat layanan Anda di-deploy. Sebaiknya tentukan RUNTIME_ID untuk sebagian besar kasus.
  • STACK/RUNTIME_ID: Alias untuk jalur image dasar lengkap. Image dasar akan diambil dari repositori di REGION yang sama dengan tempat layanan Anda di-deploy. Gunakan opsi ini jika Anda memerlukan paket sistem tertentu dalam stack.
  • REGION-docker.pkg.dev/serverless-runtimes/STACK/runtimes/RUNTIME_ID: Jalur lengkap gambar dasar. Gunakan opsi ini jika Anda menginginkan kontrol penuh atas image dasar tertentu dan wilayah tempat image tersebut didownload.

Untuk tiga metode dalam menentukan image dasar, ganti:

  • REGION dengan region pilihan, misalnya europe-west1.
  • STACK dengan stack sistem operasi pilihan, misalnya google-24-full.
  • RUNTIME_ID dengan ID runtime bahasa yang digunakan oleh fungsi Anda, misalnya nodejs24.

Misalnya, untuk mereferensikan jalur image dasar lengkap untuk image dasar Node.js terbaru menggunakan stack google-24-full, yang dihosting di europe-west1, gunakan URL berikut:

europe-west1-docker.pkg.dev/serverless-runtimes/google-24-full/runtimes/nodejs24

Node.js

Runtime ID Runtime Stack Image dasar runtime Penghentian penggunaan Penghapusan
Node.js 24 nodejs24
  • google-24 (default)
  • google-24-full
  • google-24/nodejs24
  • google-24-full/nodejs24
  • 2028-04-30 2028-10-31
    Node.js 22 nodejs22
  • google-22 (default)
  • google-22-full
  • google-22/nodejs22
  • google-22-full/nodejs22
  • 30-04-2027 31-10-2027
    Node.js 20 nodejs20
  • google-22 (default)
  • google-22-full
  • google-22/nodejs20
  • google-22-full/nodejs20
  • 2026-04-30 30-10-2026
    Node.js 18 nodejs18
  • google-22 (default)
  • google-22-full
  • google-22/nodejs18
  • google-22-full/nodejs18
  • 2025-04-30 30-10-2025
    Node.js 16 nodejs16 google-18-full google-18-full/nodejs16 30-01-2024 30-01-2025
    Node.js 14 nodejs14 google-18-full google-18-full/nodejs14 30-01-2024 30-01-2025
    Node.js 12 nodejs12 google-18-full google-18-full/nodejs12 30-01-2024 30-01-2025
    Node.js 10 nodejs10 google-18-full google-18-full/nodejs10 30-01-2024 30-01-2025
    Node.js 8 nodejs8 Dihapus Dihapus 2020-06-05 Februari 2021
    Node.js 6 nodejs6 Dihapus Dihapus 2019-04-17 Agustus 2020

    Python

    Runtime ID Runtime Stack Image dasar runtime Penghentian penggunaan Penghapusan
    Python 3.14 python314
  • google-24 (default)
  • google-24-full
  • google-24/python314
  • google-24-full/python314
  • 2030-10-10 2031-04-10
    Python 3.13 python313
  • google-22 (default)
  • google-22-full
  • google-22/python313
  • google-22-full/python313
  • 10-10-2029 10-04-2030
    Python 3.12 python312
  • google-22 (default)
  • google-22-full
  • google-22/python312
  • google-22-full/python312
  • 2028-10-02 02-04-2029
    Python 3.11 python311
  • google-22 (default)
  • google-22-full
  • google-22/python311
  • google-22-full/python311
  • 2027-10-24 24-04-2028
    Python 3.10 python310
  • google-22 (default)
  • google-22-full
  • google-22/python310
  • google-22-full/python310
  • 2026-10-04 04-04-2027
    Python 3.9 python39 google-18-full google-18-full/python39 2025-10-05 05-04-2026
    Python 3.8 python38 google-18-full google-18-full/python38 2024-10-14 14-10-2025
    Python 3.7 python37 google-18-full google-18-full/python37 30-01-2024 30-01-2025

    Go

    Runtime ID Runtime Stack Image dasar runtime Penghentian penggunaan Penghapusan
    Go 1.26 go126
  • google-24 (default)
  • google-24-full
  • google-24/go126
  • google-24-full/go126
  • Go 1.25 go125
  • google-22 (default)
  • google-22-full
  • google-22/go125 google-22-full/go125
  • google-22-full/go125
  • Go 1.24 go124
  • google-22 (default)
  • google-22-full
  • google-22/go124
  • google-22-full/go124
  • 2026-09-02 2027-03-02
    Go 1.23
    go123
  • google-22 (default)
  • google-22-full
  • google-22/go123
  • google-22-full/go123
  • 21-02-2026 21-08-2026
    Go 1.22 go122
  • google-22 (default)
  • google-22-full
  • google-22/go122
  • google-22-full/go122
  • 28-01-2026 28-07-2026
    Go 1.21 go121
  • google-22 (default)
  • google-22-full
  • google-22/go121
  • google-22-full/go121
  • 03-09-2025 03-03-2026
    Go 1.20 go120
  • google-22 (default)
  • google-22-full
  • google-22/go120
  • google-22-full/go120
  • 01-05-2024 01-05-2025
    Go 1.19 go119
  • google-22 (default)
  • google-22-full
  • google-22/go119
  • google-22-full/go119
  • 2024-04-30 30-01-2025
    Go 1.18 go118
  • google-22 (default)
  • google-22-full
  • google-22/go118
  • google-22-full/go120
  • 30-01-2024 30-01-2025
    Go 1.16 go116 google-18-full google-18-full/go116 30-01-2024 30-01-2025
    Go 1.13 go113 google-18-full google-18-full/go113 30-01-2024 30-01-2025
    Go 1.11 go111 Dihapus Dihapus 2020-08-05 Februari 2021

    Java

    Runtime ID Runtime Stack Image dasar runtime Penghentian penggunaan Penghapusan
    Java 25 java25
  • google-24 (default)
  • google-24-full
  • google-24/java25
  • google-24-full/java25
  • Oktober 2031
    Java 21 java21
  • google-22 (default)
  • google-22-full
  • google-22/java21
  • google-22-full/java21
  • September 2031
    Java 17 java17
  • google-22 (default)
  • google-22-full
  • google-22/java17
  • google-22-full/java17
  • Oktober 2027
    Java 11 java11 google-18-full google-18-full/java11 2024-10-31 31-10-2025

    Ruby

    Runtime ID Runtime Stack Image dasar runtime Penghentian penggunaan Penghapusan
    Ruby 4.0 ruby40 google-24-full (default) google-24-full/ruby40 2029-03-31 2029-09-30
    Ruby 3.4 ruby34
  • google-22 (default)
  • google-22-full
  • google-22/ruby34
  • google-22-full/ruby34
  • 31-03-2028 30-09-2028
    Ruby 3.3 ruby33
  • google-22 (default)
  • google-22-full
  • google-22/ruby33
  • google-22-full/ruby33
  • 31-03-2027 30-09-2027
    Ruby 3.2 ruby32
  • google-22 (default)
  • google-22-full
  • google-22/ruby32
  • google-22-full/ruby32
  • 2026-03-31 30-09-2026
    Ruby 3.0 ruby30 google-18-full google-18-full/ruby30 31-03-2024 2025-03-31
    Ruby 2.7 ruby27 google-18-full google-18-full/ruby27 30-01-2024 30-01-2025
    Ruby 2.6 ruby26 google-18-full google-18-full/ruby26 30-01-2024 30-01-2025

    PHP

    Runtime ID Runtime Stack Image dasar runtime Penghentian penggunaan Penghapusan
    PHP 8.5 php85 google-24-full (default) google-24-full/php85 2029-12-31 2030-06-30
    PHP 8.4 php84 google-22-full (default) google-22-full/php84 31-12-2028 30-06-2029
    PHP 8.3 php83 google-22-full (default) google-22-full/php83 31-12-2027 30-06-2028
    PHP 8.2 php82 google-22-full (default) google-22-full/php82 31-12-2026 30-06-2027
    PHP 8.1 php81 google-18-full google-18-full/php81 31-12-2025 30-06-2026
    PHP 7.4 php74 google-18-full google-18-full/php74 30-01-2024 30-01-2025

    .NET

    Runtime ID Runtime Stack Image dasar runtime Penghentian penggunaan Penghapusan
    .NET 10 dotnet10
  • google-24 (default)
  • google-24-full
  • google-24/dotnet10
  • google-24-full/dotnet10
  • 2028-11-14 2029-05-14
    .NET 8 dotnet8
  • google-22 (default)
  • google-22-full
  • google-22/dotnet8
  • google-22-full/dotnet8
  • 2026-11-10 2027-05-10
    .NET 6 dotnet6
  • google-22 (default)
  • google-22-full
  • google-22/dotnet6
  • google-22-full/dotnet6
  • 2024-11-12 12-11-2025
    .NET Core 3 dotnet3 google-18-full google-18-full/dotnet3 30-01-2024 30-01-2025

    Khusus OS

    Runtime ID Runtime Stack Image dasar runtime Penghentian penggunaan Penghapusan
    OS hanya 24 osonly24 google-24 (default) google-24/osonly24 30 April 2029