Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions cloud_build/firebase-ghcli/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to not just change the first line to the Dart official image?
FROM dart:beta

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if it Cloud Build required using a gcr.io hosted image as the base image, so I went with this.

Looking more now though, https://cloud.google.com/build/docs/interacting-with-dockerhub-images does explicitly mention docker hub images are supported, so I'll try it out! Has the added benefit of supporting arm if needed.


# 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;
Expand All @@ -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
3 changes: 2 additions & 1 deletion cloud_build/firebase-ghcli/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down