title: Google Cloud Build Docker build-arg from file
body: <p>I have a problem when I use Google Cloud Build. I can't pass the key into docker by cloudbuild.yaml</p>
  
  <p>Google buildfile.yaml:</p>
  
  <pre><code>- name: 'gcr.io/cloud-builders/gcloud'
    args:
    - kms
    - decrypt
    - --ciphertext-file=A.enc
    - --plaintext-file=/root/.ssh/id_rsa
    - --location=global
    - --keyring=keyringxxx
    - --key=keyxxx
    volumes:
    - name: 'ssh'
      path: /root/.ssh
  - name: 'gcr.io/cloud-builders/docker'
    args: [
      'build', '.',
      '-t', 'gcr.io/$PROJECT_ID/xxx:latest',
      '--build-arg', 'READ_KEY=`cat /root/.ssh/id_rsa`'
    ]
    volumes:
    - name: 'ssh'
  </code></pre>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM golang:1.11 AS builder
  
  ARG READ_KEY
  RUN mkdir -p ~/.ssh &amp;&amp;  \
      echo "$READ_KEY" &gt; ~/.ssh/id_rsa &amp;&amp; \
      chmod 0600 ~/.ssh/id_rsa &amp;&amp; \
      ssh-keyscan github.com &gt;&gt; /root/.ssh/known_hosts &amp;&amp; \
      git config --global url.ssh://git@github.com/XXXX.insteadOf https://github.com/XXXX
  
  ......
  </code></pre>
  
  <p>The above code failed. <code>cat</code> does not work.</p>