Detail here

You can read this Github issue

In short

If you follow Codefresh official document for docker swarm deployment

the highest version you can use inside docker-stack.yml is version 3.1
which is not good. now the newest is version 3.7

this problem cause by codefresh/remote-docker image.
that's why I opened a Github issue there