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 google/cloud-sdk 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.
For example, on a base Centos container running on GCE with custom code and gcloud/gsutil installed, when you run:
docker run --rm -ti custom-container gsutil ls
You are prompted to run "gsutil config" to gain authorization, which I expect.
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.
I am looking to replicate that behavior in a minimal build Centos container for mass deployment.