You can use Go templates for the hostname. For example, you could do --hostname="frontend-{{.Node.Hostname}}-{{.Task.ID}}"
to append the swarm node’s host name and the service task’s ID.
2 Likes
Share and learn in the Docker community.
You can use Go templates for the hostname. For example, you could do --hostname="frontend-{{.Node.Hostname}}-{{.Task.ID}}"
to append the swarm node’s host name and the service task’s ID.