是否可以使用Stackdriver监视代理程序设置通用Docker镜像,以便它可以将容器内的日志记录数据发送到Stackdriver,然后可以在任何VM实例中使用它,而与GCE和AWS无关?
更新
FROM ubuntu:16.04
USER root
ADD . /
ENV GOOGLE_APPLICATION_CREDENTIALS="/etc/google/auth/application_default_credentials.json"
RUN apt-get update && apt-get -y --no-install-recommends install wget curl python-minimal ca-certificates lsb-release libidn11 openssl && \
RUN curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh
RUN bash install-logging-agent.sh
我完全遵循documentation中所说的内容。安装正常。但Google流利的无法启动/重新启动。
提前致谢。
最佳答案
是的,根据documentation,这应该是可能的。
您将需要确保Stackdriver代理为installed并在Docker镜像中正确配置。
关于bash - Docker容器中的Stackdriver Agent,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/52123754/