Score:0

Can I tail the log of ONE container in a docker-compose group?

at flag

I'm still struggling to understand why my ipmi_exporter container will not run in the same "pod" as my Prometheus, Grafana, snmp_exporter and alertmanager. When I bring up the "pod," docker-compose says ipmi_exporter has started but docker-compose ps cannot find the container. I'd like to be able to see the log containing the startup for ipmi_exporter, if that was not made clear in my post title.

Also, what is a docker-compose group of containers called? Pods are a K8s thing.

Score:3
rs flag

The docker-compose binary only commands the docker daemon. You can simply use the docker command to get what you need.

Use docker ps or docker ps -a to find out about your containers.

Use docker logs ... with container name to get logs out of a particular container. This works even if you have redirected your logs elsewhere in compose file.

Docker itself sort-of does not have a notion of a "pod". The closest you can get is to define a stack which is a collection of networks, volumes and containers - this is similar to K8s pod. Also, the stack is actually what you define in docker-compose.yml file.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.