Docker Community Forums

Share and learn in the Docker community.

Can't get google stackdriver logging working


(Tim Uckun) #1

I am trying to get stackdriver logging working Here is the command line

export GOOGLE_APPLICATION_CREDENTIALS=~/secrets/development-area-baae5fc698ab.json
docker \
    --debug \
    --config .  \
    --log-level debug \
run \
        --env-file=.env_development \
        --log-driver=gcplogs \
        --log-opt labels=keycloak \
        --log-opt env=GOOGLE_APPLICATION_CREDENTIALS \
        --log-opt gcp-project=development-area-218700 \
        -p 8080:8080 \
        jboss/keycloak

Here is the daemon.json file

{
  "debug" : true,
  "experimental" : true,
  "log-driver" : "gcplogs"
}

This is the error I get

DEBU[0000] [hijack] End of stdout                       
docker: Error response from daemon: failed to initialize logging driver: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
ERRO[0000] error waiting for container: context canceled 

The credentials file is definitely there. Everything I have read this is supposed to work but it doesn’t and the error message doesn’t help at all.

What is going wrong here.


(Tim Uckun) #2

Hate to bump my own question but does anybody have an answer for this?