docker 日志容器不读取 docker 日志

docker 日志容器不读取 docker 日志

刚接触docker....

因此运行了几个容器,我想运行一个日志容器来收集所有日志并将它们发送到 Rapid7。

rapid7 容器正在工作,并将统计数据发送到远程系统日志。

但是...它没有发送容器日志...

使用 hello-world 容器创建测试容器日志,因为它很简单。

docker run hello-world 

然后查看日志:

docker logs compassionate_chaum

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

显示标准输出,很好。但它没有出现在我的远程日志中?

我错过了什么?

答案1

看起来运行正常。这是hello-worlddocker 镜像的标准输出日志。

相关内容