Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker create service vs. docker deploy stack

The new Docker 1.13.0 release introduced docker stack deploy.

docker stack deploy adds support of deploying services from a docker-compose.yml file directly.

Are the command docker service create and docker deploy stack creating the same service, just i two different ways?

Are there any special features added the service by creating it with docker deploy stack?

Im a bit confused, and can't find any information about this subject.

Thanks in advance

like image 787
RooKie- Avatar asked Dec 23 '22 21:12

RooKie-


1 Answers

A stack is a collection of services. This is similar to how a compose file defines a group of containers to run. So if you only need to run a single service, you can do so with a docker service create. If you need to deploy a collection of services, or use a definition from a compose file as your definition for the service(s), then you would deploy them with docker stack deploy.

like image 105
BMitch Avatar answered Dec 28 '22 11:12

BMitch