I’m trying to have the container hostname match the hostname of the docker host. I followed the docs Deploy services to a swarm | Docker Documentation
but it seems that the string is never evaluated and is instead passed directly.
I was able to get it to work, I was trying to test it with compose before deploying but it didn’t seem like that was working. I just deployed it and it worked fine. interesting
I am afraid it was a wrong expectation on your side: swarm template placeholder indeed only work for swarm. docker-compose ignores/filters out all swarm specific configuration elements,