Docker Compose version 3 : Can I deploy a service and specify the names of the corresponding containers?

I want to create a service in docker swarm and deploy it. I want to know if it is possible to name the container the way I want. Since there will be replicas for service I assume it is not possible to do so, but I can really use anyone’s help in this.

Thanks !