Suggestion : Variables in host

Would it be possible to foresee a variable in the networking hostname?

Use case ;
I use datadog as monitoring tool. They support an agent deployment as a container.
So I’ve added a service where I indicate that the container needs to run on all hosts.
Though the way they distinguish hosts is on hostname.
So when I choose one myself, all the hosts are named the same. When I use the containername, then the software break on the usage of an underscore.

Their intake is that the hostname is not compliant with RFC1123

FYI - A “hack” to fix the implementation is to set the networking to host… Though I don’t like that approach.

Same problem here. We found another solution in not setting a hostname at all so that a random id is used per agent instance.
Our docker-compose.yml looks like this:

    API_KEY: ...
  labels: 'true'
    io.rancher.container.pull_image: always
    io.rancher.container.start_once: 'true'
  tty: true
  image: datadog/docker-dd-agent:latest
  privileged: true
  - /var/run/docker.sock:/var/run/docker.sock
  - /proc/mounts:/host/proc/mounts:ro
  - /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
  stdin_open: true

Still, rancher should either allow to pass-through the real hostname (io.rancher.container.hostname_override: host_name maybe?) or create RFC-compliant container names.