Currently I am working on deploying applications using the docker stack command (e.g.: docker stack deploy --compose-file docker-stack-compose.yml myapp)
After deploying using the syntax shown above, I am finding that the docker service name (when viewed from ‘docker service ls’) is something similar to the below:
sample1 is taken from the service name that is defined in the docker-stack-compose.yml file.
My question is whether it is possible to specify the service name that is used when deploying using the docker stack command in the docker-stack-compose.yml file. For example is there any parameter I could specify in the compose file, that docker then uses as the service name?
Thanks in advance.