title: Recommended GCE service account authentication inside Docker container?
body: <p>What is the best way to deploy Google service account credentials inside a custom built CentOS Docker container for running either on Google's Container Engine or their 'container-vm'?  This behavior happens automatically on the <a href="https://registry.hub.docker.com/u/google/cloud-sdk/">google/cloud-sdk</a> container, which runs debian and includes things I'm not using such as app-eng/java/php.  Ideally I am trying to access non-public resources inside my project, e.g., Google Cloud Storage bucket objects, without loging in and authorizing every single time a large number of these containers are launched.  </p>
  
  <p>For example, on a base Centos container running on GCE with custom code and gcloud/gsutil installed, when you run:</p>
  
  <pre><code>docker run --rm -ti custom-container gsutil ls
  </code></pre>
  
  <p>You are prompted to run "gsutil config" to gain authorization, which I expect.  </p>
  
  <p>However, pulling down the google/cloud-sdk container onto the same GCE and executing the same command, it seems to have cleverly configured inheritance of credentials (perhaps from the host container-vm's credentials?).  This seems to bypass running "gsutil config" when running the container on GCE to access private resources.  </p>
  
  <p>I am looking to replicate that behavior in a minimal build Centos container for mass deployment.  </p>