container:
a server app
-> docker build image from a Dockerfile
-> docker run
services:
one host, run a service with multi app instance
-> docker swarm init
-> docker stack deploy -c docker-compose.yml xxx, which define replic, deploy params …
-> docker stack rm xxx
-> docker swarm leave --force
swarms:
multi host as a cluster, run a service with multi app instance, strategies to run containers in compose.yml can be:
“emptiest node”: fills the least utilized machines with containers.
“global”: which ensures that each machine gets exactly one instance of the specified container
-> docker-machine create
-> docker swarm init on one host as master
-> docker swarm join master as worker
stacks:
with multi host as a cluster, run multi services which can be run in multi app instance,
using strategies the same as swarms
FAQ:
What is the difference between docker service and stack?