Skip to content

Allow setting hostname in docker service create/update #24877

@mcassaniti

Description

@mcassaniti

If some variable substitution can be done within the service create and service update commands, it would be ideal to build the hostname for a container from such variable substitutions. For instance, if the service name is represented as %s and the task ID is represented as %i, a hostname could be build as %s-%i.

Example: Service name is smtp, and there are three tasks (1,2,3). The hostname could then be set as smtp-1, smtp-2, smtp-3 depending on the task ID.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/swarmkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions