Docker Community Forums

Share and learn in the Docker community.

Cluster hostname substitution for log-opt -tag=<template>?

Per the docs at


there are a number of substitutions you can make in a Go template for the value of the “-log-opt tag” option.

It’s great I can get the container name in there, but when I have things running in clusters, I’d like to also know which cluster host that container is running on.

Is there any way to get information about the cluster-host into the logstream or tag configuration setting?

Many thanks!