I used most of these examples in some form (thanks @KJoe), but I had to do a few more things to set everything up so that gcloud work in the environment. Note that it is preferable to limit the number of lines (this limits the layers that need to be pulled)
Here's a more complete Dockerfile example with gcloud configuring and extending the CircleCI image:
FROM circleci/ruby:2.4.1-jessie-node-browsers # user is circleci in the FROM image, switch to root for system lib installation USER root ENV CCI /home/circleci ENV GTMP /tmp/gcloud-install ENV GSDK $CCI/google-cloud-sdk ENV PATH="${GSDK}/bin:${PATH}" # do all system lib installation in one-line to optimize layers RUN curl -sSL https:
kross source share