From a21755ba0a9a75cbb4be4cd407fd2d0a8b60678e Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Wed, 2 Jul 2025 14:53:09 +0800 Subject: [PATCH 1/2] Include Dart beta in Cloud Build stage/deploy image --- cloud_build/firebase-ghcli/Dockerfile | 14 ++++++++++---- cloud_build/firebase-ghcli/README.md | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/cloud_build/firebase-ghcli/Dockerfile b/cloud_build/firebase-ghcli/Dockerfile index 5d55977..87c1bdc 100644 --- a/cloud_build/firebase-ghcli/Dockerfile +++ b/cloud_build/firebase-ghcli/Dockerfile @@ -1,9 +1,15 @@ FROM marketplace.gcr.io/google/debian12 +# Install prerequisite dependencies. +RUN apt-get update && apt-get install -y curl gpg apt-transport-https + +# Install the latest Dart beta. +RUN wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg \ +RUN echo "deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian testing main" | tee /etc/apt/sources.list.d/dart_testing.list \ +RUN apt-get update +RUN apt-get -t testing install -y dart + # Install the GitHub cli. -RUN apt update && apt install -y \ - curl \ - gpg RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg; RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null; RUN apt update && apt install -y gh; @@ -16,5 +22,5 @@ RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesourc RUN apt-get update RUN apt-get install nodejs -y -# Install firebase-tools +# Install the latest version of firebase-tools globally. RUN npm install -g firebase-tools diff --git a/cloud_build/firebase-ghcli/README.md b/cloud_build/firebase-ghcli/README.md index d7d0d3d..f4fb1e0 100644 --- a/cloud_build/firebase-ghcli/README.md +++ b/cloud_build/firebase-ghcli/README.md @@ -1,13 +1,14 @@ ## Summary This directory contains a Dockerfile that provides access to -Node/NPM, Firebase CLI tools, and the GitHub CLI. +Dart, Node/NPM, Firebase CLI tools, and the GitHub CLI. This image is used to deploy various Dart/Flutter websites to Firebase in both production and staging, and is also used to comment staging links on GitHub PRs. ## Installed tools +* Dart SDK * GitHub CLI * Node/NPM * Firebase Tools From 5bce490d1beed770d48af0eb05f967497a204995 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Wed, 2 Jul 2025 15:46:54 +0800 Subject: [PATCH 2/2] Use official Dart image instead of installing manually --- cloud_build/firebase-ghcli/Dockerfile | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cloud_build/firebase-ghcli/Dockerfile b/cloud_build/firebase-ghcli/Dockerfile index 87c1bdc..3268180 100644 --- a/cloud_build/firebase-ghcli/Dockerfile +++ b/cloud_build/firebase-ghcli/Dockerfile @@ -1,13 +1,7 @@ -FROM marketplace.gcr.io/google/debian12 +FROM dart:beta # Install prerequisite dependencies. -RUN apt-get update && apt-get install -y curl gpg apt-transport-https - -# Install the latest Dart beta. -RUN wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg \ -RUN echo "deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian testing main" | tee /etc/apt/sources.list.d/dart_testing.list \ -RUN apt-get update -RUN apt-get -t testing install -y dart +RUN apt-get update && apt-get install -y curl gpg # Install the GitHub cli. RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg;