0

We are using docker stack deploy to create or update the docker services, with this approach the service name is defined as "StackName_ServiceName". Can we have '-' instead of using '_' for the service name?

This is required as one of our docker services fails to start as it considers underscore to be an illegal character in the service name.

Similar issue Feign Client and name from properties

Santhosh
  • 671
  • 12
  • 36
  • can you provide link to the compose file ? – ravikt Nov 13 '19 at 05:16
  • Probably these links might help you 1. https://stackoverflow.com/questions/46546497/how-to-change-the-service-name-generated-by-docker-stack-in-docker-compose 2. https://github.com/docker/swarm/issues/2885 – ravikt Nov 13 '19 at 05:49
  • @ravikt To resolve this issue, we need to use service create command instead of docker stack deploy. – Santhosh Nov 13 '19 at 07:00
  • did you try `docker service create` with `--name` flag ? – ravikt Nov 13 '19 at 08:30
  • Yes, docker service creates works, can we execute service create command with docker-compose yaml file. – Santhosh Nov 13 '19 at 08:44
  • Yes, you need `Docker Compose` for that. You may want to read this link https://docs.docker.com/compose/gettingstarted/. Its a short but helpful guideline. – ravikt Nov 13 '19 at 09:12

0 Answers0