What's the difference between service scale and --replicas?

According to documentation:

Service create has a –replicas option to define the number of tasks.

Using service update –replicas option, it’s possible to change the number of tasks.

Then, why does it service scale (as I’m a newbie, i can’t post more that 2 links…) exists?
It’s just a short alias? If so, shouldn’t it be stated in docs?

Otherwise, if it part of old swarm (ie: not swarm mode released with 1.12), shouldn’t it be clearly stated on docs?
Or something else and I’m totally confused?


Trying to bump the question to got more attention, if possible.

Hi, I know this is an old question but the main difference is that docker service scale allows you to change the number of replicas for more than one service, compared to docker service update --replicas which allows you to change only one service at a time.

docker service update --replicas uint SERVICE

1 Like