title: Building Docker images from Google Cloud Functions
body: <p>As part of my CD pipeline, I am setting up a Google Cloud Function to handle new repo pushes, create docker images and push them to the registry. I have all working on a VM but there is no need to have one running 24x7 just for this. </p>
  
  <p>So, looking over <a href="https://cloud.google.com/nodejs/docs/reference/libraries" rel="nofollow noreferrer">NodeJS reference library</a>, I can't find a way to push an image to a registry using node. Seems like there is no registry or build sdk for node?</p>
  
  <p>Basically, all I need is to execute this command from a cloud function: 
  <code>gcloud builds submit --tag gcr.io/my_project/my_image</code>.</p>