docker-archive / classicswarm

Swarm Classic: a container clustering system. Not to be confused with Docker Swarm which is at https://github.com/docker/swarmkit
Apache License 2.0
5.75k stars 1.08k forks source link

Access to simple string functions in (hostname) template #2790

Closed sbrattla closed 7 years ago

sbrattla commented 7 years ago

When creating a new Swarm service, I usually set hostname to a combination of {{ Service.Name }} and {{ Task.ID }}. However, depending on the length of the service name this can cause hostnames that are more than the 64 character limit and consequently break the container.

Could simple string functions be made available in the hostname templates so that I could do some simple modifications to {{ Service.Name }} ensuring that the total hostname does not grow too large?

nishanttotla commented 7 years ago

@sbrattla this is a Docker Swarm mode issue, not related to this repo. Could you please open it on github.com/docker/docker?