我有一个docker compose文件和3个包含此文件的容器。在其中之一 容器,应用程序(sampleappservice)将日志发送到journalctl,我想捕获它。如何获取它? 这是我的撰写文件: **
version: '3'
services:
simulatorservice:
image: "data-simulator:latest"
container_name: data-simulator
build:
context: ./
dockerfile: ./Dockerfile-simulator
ports :
- "55501:55501"
volumes:
- ./data:/opt/apps/DataSimulator/data
mosquittoservice:
image: "databus:latest"
container_name: databus
build:
context: ./
dockerfile: ./Dockerfile-databus
ports :
- "1883:1883"
sampleappservice:##I need to get this container journalctl log.
image: "sampleapp:latest"
container_name: sampleapp
build:
context: ./
dockerfile: ./Dockerfile-sampleapp
**