Run a collector-container that will gather logs from other containers running on the same host and ship them to Sophie

Release or Environment

Sophie standalone versions 3.4.x - 3.7.x


NOTE: if using Kubernetes, we recommend installing a DaemonSet, as described in this article.

This container sends the logs of all other containers in the same host machine to Loom.

Running the container 

Copy the command, replacing {{customer-name}} with your customer name (you can find it in the domain name you use to access Loom, e.g. this-part.loomsystems.com):

docker run --name loom-collector-docker \
    -e CUSTOMER_NAME={{customer-name}} \
    --privileged \
    -d \
    -v /var/lib/docker/containers:/containers:ro \

When it starts, the container automatically begins listening to logs of other containers and sends them to Loom. It will identify other containers being added or removed dynamically.


  • You must have a valid Loom account
  • Your Docker version should be 17 or later 


The following configuration options can be set with the corresponding environment variables (use -e ENV_VAR_NAME=some_value  option when running the container) 

  • TAGS - tags Default is none
  • ENCODING - encoding Default is 'plain'

The container uses FileBeat internally. See the documentation of the above settings in the official FileBeat documentation.

Why not use a Sock?

The container uses the option-v to mount the folder containing all other containers logs, as READ ONLY . This is considered more secure than using a socket; Since the socket communicates directly with the docker daemon, which runs as root, using it represents a potential security threat to the local machine.

Article Information

Last Updated:2020-05-19 12:18:35