When starting the GCE, it automatically pulls and runs the docker image. I can't pass an argument to the docker run command (as far as I know), so I can't pass the argument --log-driver="gcplogs"
. The 2nd option docker specifies is adjusting the daemon.json file. However, on GCE these changes are not persisted, hence on a reboot this file is the default file.
Am I looking over something? How can I set the log-driver from docker on a google compute engine?
[Edit] I was able to get it working by choosing a container specialized OS, instead of a normal one. Then at the bottom in the management page you can set the following meta-data:
google-logging-enabled: true
https://cloud.google.com/container-optimized-os/docs/how-to/logging#Console